Skip to content

Commit 9b74805

Browse files
committed
forbid resize static element and hidden resize icon
1 parent c08bb68 commit 9b74805

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

dist/js/app.ba023a5a.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/app.ba023a5a.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/chunk-vendors.ea17aa36.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/chunk-vendors.ea17aa36.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/GridItem.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div ref="item"
33
class="vue-grid-item"
4-
:class="{ 'vue-resizable' : resizable, 'resizing' : isResizing, 'vue-draggable-dragging' : isDragging, 'cssTransforms' : useCssTransforms, 'render-rtl' : renderRtl, 'disable-userselect': isDragging, 'no-touch': isAndroid }"
4+
:class="{ 'vue-resizable' : showResizeIcon,'vue-unresizable' : !showResizeIcon, 'resizing' : isResizing, 'vue-draggable-dragging' : isDragging, 'cssTransforms' : useCssTransforms, 'render-rtl' : renderRtl, 'disable-userselect': isDragging, 'no-touch': isAndroid }"
55
:style="style"
66
>
77
<slot></slot>
@@ -374,6 +374,9 @@
374374
}
375375
},
376376
computed: {
377+
showResizeIcon(){
378+
return this.resizable&&!this.static
379+
},
377380
isAndroid() {
378381
return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
379382
},
@@ -436,6 +439,7 @@
436439
437440
},
438441
handleResize: function (event) {
442+
if (this.static) return;
439443
const position = getControlPosition(event);
440444
// Get the current drag point from the event. This is used as the offset.
441445
if (position == null) return; // not possible but satisfies flow

0 commit comments

Comments
 (0)