Skip to content

Commit fce821d

Browse files
committed
resize from any corner draft
1 parent 2d5b3e7 commit fce821d

File tree

11 files changed

+382
-60
lines changed

11 files changed

+382
-60
lines changed

beta-publish.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc
2+
3+
1. Ensure any compile is run `yarn build-lib`
4+
2. Modify version in package.json to the following format (match with existing verion numbers etc) `"version": "0.1.120-beta.1"` where beta.x is the number of those betas
5+
3. Publish to npm `npm publish --tag beta`
6+
7+
There are two options for install:
8+
* Always install beta with `npm install packagename@beta`
9+
* Install specific version with `npm install [email protected]`
10+
11+
How to fix latest if you publish a beta without --tag beta (if will default to latest)
12+
run: `npm dist-tags add @COMPANY/[email protected] latest --otp=123456`where 1.0.3 is the version that should be latest --otp= is required

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-grid-layout",
3-
"version": "2.3.12",
3+
"version": "2.3.13-beta.4",
44
"description": "A draggable and resizable grid layout, as a Vue component.",
55
"keywords": [
66
"grid",

public/app.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333

3434

35+
/*
3536
.vue-resizable-handle {
3637
z-index: 5000;
3738
position: absolute;
@@ -47,6 +48,7 @@
4748
box-sizing: border-box;
4849
cursor: se-resize;
4950
}
51+
*/
5052

5153
.vue-grid-item:not(.vue-grid-placeholder) {
5254
background: #ccc;

src/App.vue

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<div id="app">
33
<h1 style="text-align: center">Vue Grid Layout</h1>
44
<!--<pre>{{ layout | json }}</pre>-->
5+
<!-- <interact-tester></interact-tester>-->
56
<div>
67
<div class="layoutJSON">
78
Displayed as <code>[x, y, w, h]</code>:
@@ -40,20 +41,14 @@
4041
:margin="[parseInt(marginX), parseInt(marginY)]"
4142
:layout.sync="layout"
4243
:col-num="parseInt(colNum)"
43-
:row-height="rowHeight"
44+
:row-height="parseInt(rowHeight)"
4445
:is-draggable="draggable"
4546
:is-resizable="resizable"
4647
:is-mirrored="mirrored"
4748
:prevent-collision="preventCollision"
4849
:vertical-compact="compact"
49-
:use-css-transforms="true"
50+
:use-css-transforms="false"
5051
:responsive="responsive"
51-
@layout-created="layoutCreatedEvent"
52-
@layout-before-mount="layoutBeforeMountEvent"
53-
@layout-mounted="layoutMountedEvent"
54-
@layout-ready="layoutReadyEvent"
55-
@layout-updated="layoutUpdatedEvent"
56-
@breakpoint-changed="breakpointChangedEvent"
5752
>
5853
<grid-item v-for="item in layout" :key="item.i"
5954
:static="item.static"
@@ -64,16 +59,14 @@
6459
:i="item.i"
6560
:min-w="item.minW"
6661
:max-w="item.maxW"
62+
:min-h="item.minH"
63+
:max-h="item.maxH"
6764
:min-x="item.minX"
6865
:max-x="item.maxX"
6966
:min-y="item.minY"
7067
:max-y="item.maxY"
68+
:resize-from="['left', 'right', 'top', 'bottom']"
7169
:preserve-aspect-ratio="item.preserveAspectRatio"
72-
@resize="resize"
73-
@move="move"
74-
@resized="resized"
75-
@container-resized="containerResized"
76-
@moved="moved"
7770
>
7871
<!--<custom-drag-element :text="item.i"></custom-drag-element>-->
7972
<test-element :text="item.i" @removeItem="removeItem($event)"></test-element>
@@ -113,14 +106,15 @@
113106
import GridLayout from './components/GridLayout.vue';
114107
// import ResponsiveGridLayout from './components/ResponsiveGridLayout.vue';
115108
import TestElement from './components/TestElement.vue';
116-
import CustomDragElement from './components/CustomDragElement.vue';
109+
// import CustomDragElement from './components/CustomDragElement.vue';
117110
import {getDocumentDir, setDocumentDir} from "./helpers/DOM";
111+
import InteractTester from "@/components/InteractTester";
118112
//var eventBus = require('./eventBus');
119113
120-
let testLayout = [
121-
{"x":0,"y":0,"w":2,"h":2,"i":"0", resizable: true, draggable: true, static: false, minY: 0, maxY: 2},
114+
/*let testLayout = [
115+
{"x":0,"y":0,"w":2,"h":2,"i":"0", resizable: true, draggable: true, static: false, minY: 0, maxY: 2, minW: 2, maxW: 4, minH: 2, maxH: 4},
122116
{"x":2,"y":0,"w":2,"h":4,"i":"1", resizable: null, draggable: null, static: true},
123-
{"x":4,"y":0,"w":2,"h":5,"i":"2", resizable: false, draggable: false, static: false, minX: 4, maxX: 4, minW: 2, maxW: 2, preserveAspectRatio: true},
117+
{"x":4,"y":0,"w":2,"h":5,"i":"2", resizable: false, draggable: false, static: false, minX: 4, maxX: 4, minW: 2, maxW: 4, preserveAspectRatio: true},
124118
{"x":6,"y":0,"w":2,"h":3,"i":"3", resizable: false, draggable: false, static: false},
125119
{"x":8,"y":0,"w":2,"h":3,"i":"4", resizable: false, draggable: false, static: false},
126120
{"x":10,"y":0,"w":2,"h":3,"i":"5", resizable: false, draggable: false, static: false},
@@ -138,6 +132,11 @@
138132
{"x":10,"y":4,"w":2,"h":2,"i":"17", resizable: false, draggable: false, static: false},
139133
{"x":0,"y":9,"w":2,"h":3,"i":"18", resizable: false, draggable: false, static: false},
140134
{"x":2,"y":6,"w":2,"h":2,"i":"19", resizable: false, draggable: false, static: false}
135+
];*/
136+
137+
let testLayout = [
138+
{"x":5,"y":0,"w":1,"h":3,"i":"0", resizable: true, draggable: true},
139+
{"x":6,"y":0,"w":6,"h":6,"i":"1", resizable: true, draggable: true},
141140
];
142141
143142
/*let testLayout = [
@@ -151,10 +150,11 @@
151150
export default {
152151
name: 'app',
153152
components: {
153+
InteractTester,
154154
GridLayout,
155155
GridItem,
156156
TestElement,
157-
CustomDragElement,
157+
// CustomDragElement,
158158
},
159159
data () {
160160
return {

0 commit comments

Comments
 (0)