Browse Source

拖拽位置记录

laiguoran 3 years ago
parent
commit
4d2d3928fd
1 changed files with 10 additions and 3 deletions
  1. 10 3
      app/public/js/change_information.js

+ 10 - 3
app/public/js/change_information.js

@@ -300,12 +300,19 @@ $(document).ready(() => {
         select: '#right-spr',
         callback: function () {
             changeSpread.refresh();
-            // leafXmjSpread.refresh();
             xmjSpread.refresh();
-            // const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
-            // setLocalCache('material_list_' + materialID, width);
+            const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
+            setLocalCache('change_information_width', width);
         }
     });
+
+    // 根据浏览器记录展开收起
+    if (getLocalCache('change_information_width')) {
+        $('#left-view').css('width', (100 - parseFloat(getLocalCache('change_information_width'))) + '%');
+        $('#right-view').css('width', getLocalCache('change_information_width') + '%');
+        changeSpread.refresh();
+        xmjSpread.refresh();
+    }
 });
 function findDecimal(unit) {
     let value = precision.other.value;