@saluzi/saluzi-edu 0.1.71 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +97 -60
- package/dist/parade/web/cube.js +7 -15
- package/package.json +1 -1
package/dist/parade/web/cube.js
CHANGED
|
@@ -208,37 +208,29 @@ document.addEventListener('contextmenu', function (e) {
|
|
|
208
208
|
// proportional resize. The main process polls the cursor and moves/resizes
|
|
209
209
|
// the window until mouseup. Right-click is left untouched so 'contextmenu'
|
|
210
210
|
// fires normally and the Close menu works.
|
|
211
|
-
|
|
211
|
+
//
|
|
212
|
+
// mouseup always calls stopDrag() — the main-process stop-drag handler
|
|
213
|
+
// cleans up both drag and resize state (and re-locks min/max size).
|
|
212
214
|
if (window.parade && typeof window.parade.startDrag === 'function') {
|
|
213
215
|
document.addEventListener('mousedown', function (e) {
|
|
214
216
|
if (e.button !== 0) return // left button only
|
|
215
217
|
if (e.target.closest('#ctx-menu')) return // don't drag from menu
|
|
216
218
|
var cornerEl = e.target.closest('[data-corner]')
|
|
217
219
|
if (cornerEl && typeof window.parade.startResize === 'function') {
|
|
218
|
-
isResizing = true
|
|
219
220
|
window.parade.startResize(cornerEl.dataset.corner)
|
|
220
221
|
} else {
|
|
221
|
-
isResizing = false
|
|
222
222
|
window.parade.startDrag()
|
|
223
223
|
}
|
|
224
224
|
})
|
|
225
225
|
document.addEventListener('mouseup', function (e) {
|
|
226
226
|
if (e.button !== 0) return
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
window.parade.stopDrag()
|
|
231
|
-
}
|
|
232
|
-
isResizing = false
|
|
227
|
+
// Always route through stopDrag — it clears both drag and resize state
|
|
228
|
+
// and re-locks the min/max size constraint for the next interaction.
|
|
229
|
+
window.parade.stopDrag()
|
|
233
230
|
})
|
|
234
231
|
// If the mouse leaves the window while dragging/resizing, stop too.
|
|
235
232
|
window.addEventListener('blur', function () {
|
|
236
|
-
|
|
237
|
-
window.parade.stopResize()
|
|
238
|
-
} else {
|
|
239
|
-
window.parade.stopDrag()
|
|
240
|
-
}
|
|
241
|
-
isResizing = false
|
|
233
|
+
window.parade.stopDrag()
|
|
242
234
|
})
|
|
243
235
|
}
|
|
244
236
|
|