Changeset 37538 for gs3-extensions/tabletop-dl/trunk/tabletop.html
- Timestamp:
- 2023-03-18T00:09:16+13:00 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/tabletop-dl/trunk/tabletop.html
r37533 r37538 18 18 <script src="winbox-dist/js/winbox.min.js"></script> 19 19 --> 20 <link rel="stylesheet" href=" src/winbox-with-interactjs/dist/css/winbox.min.css">21 <script src=" src/winbox-with-interactjs/dist/js/winbox.min.js"></script>20 <link rel="stylesheet" href="winbox-with-interactjs-dist/css/winbox.min.css"> 21 <script src="winbox-with-interactjs-dist/js/winbox.min.js"></script> 22 22 23 23 <script src="interactjs-dist/interact.min.js"></script> … … 100 100 </body> 101 101 <script> 102 /* 103 function gsToggleHeader() 104 { 105 $('#gs-header').slideToggle(); 106 } 107 */ 102 108 103 $(document).ready(function() { 109 104 $("#gs-control-bar").width("100%").hide(); … … 115 110 }); 116 111 117 118 const win = new WinBox({119 id: "my-winbox",120 title: 'My Window2',121 width: '400px',122 height: '400px',123 });124 125 interact('#my-winbox')126 .draggable({127 // enable inertial throwing128 inertia: true,129 // keep the element within the area of it's parent130 modifiers: [131 interact.modifiers.restrictRect({132 restriction: 'parent',133 endOnly: true134 })135 ],136 // enable autoScroll137 autoScroll: true,138 139 listeners: {140 // call this function on every dragmove event141 move: dragMoveListener,142 143 // call this function on every dragend event144 end (event) {145 var textEl = event.target.querySelector('p')146 147 textEl && (textEl.textContent =148 'moved a distance of ' +149 (Math.sqrt(Math.pow(event.pageX - event.x0, 2) +150 Math.pow(event.pageY - event.y0, 2) | 0))151 .toFixed(2) + 'px')152 }153 }154 });155 156 112 }); 157 113 158 114 </script> 115 159 116 </html>
Note:
See TracChangeset
for help on using the changeset viewer.