@cocreate/resize 1.1.76 → 1.2.0
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/CHANGELOG.md +12 -0
- package/demo/dashboard.html +7 -5
- package/demo/index.html +5 -24
- package/package.json +1 -1
- package/src/index.js +118 -51
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [1.2.0](https://github.com/CoCreate-app/CoCreate-resize/compare/v1.1.76...v1.2.0) (2022-06-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bug when resizing from corners ([293a478](https://github.com/CoCreate-app/CoCreate-resize/commit/293a47828b662c96cfb4b34bd5f1f7b7e608fa5f))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* if closest element is contentEditable use crdt text functiontions to insert styles resulting from resize ([4e8668e](https://github.com/CoCreate-app/CoCreate-resize/commit/4e8668e23d7fe9502258d676eebc170eb9771995))
|
|
12
|
+
|
|
1
13
|
## [1.1.76](https://github.com/CoCreate-app/CoCreate-resize/compare/v1.1.75...v1.1.76) (2022-06-18)
|
|
2
14
|
|
|
3
15
|
|
package/demo/dashboard.html
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
<main class="padding:10px" content_id="content">
|
|
189
189
|
<!--<div class="domEditor main-height" name='cards1' collection="test" pass_id="me1234">-->
|
|
190
190
|
|
|
191
|
-
<div class="display:grid grid-auto-rows:50px gap:10px grid-template-columns:repeat(auto-fill,minmax(50px,1fr))" dnd-group-name="dashboard" fetch-collection="files" template_id="card" droppable="true">
|
|
191
|
+
<div class="display:grid grid-auto-rows:50px gap:10px grid-template-columns:repeat(auto-fill,minmax(50px,1fr))" dnd-group-name="dashboard" fetch-collection="files" fetch-count="20" template_id="card" droppable="true">
|
|
192
192
|
|
|
193
193
|
<div template_id="card" class="card position:relative template display:flex padding:20px align-items:center grid-column-end:span_6 grid-row-end:span_2" eid="id1" draggable="tru" resizable>
|
|
194
194
|
<!-- dashboard template-->
|
|
@@ -206,8 +206,10 @@
|
|
|
206
206
|
<div class="width:120px">
|
|
207
207
|
<div class="progressbar-circle text-align:center width:100%" progressbar-color="#22CCE2" percent-value="85" percent-note="New Visits"></div>
|
|
208
208
|
</div>
|
|
209
|
-
<div resize="
|
|
210
|
-
<div resize="bottom"></div>
|
|
209
|
+
<div resize="top" dnd-exclude></div>
|
|
210
|
+
<div resize="bottom" dnd-exclude></div>
|
|
211
|
+
<div resize="left" dnd-exclude></div>
|
|
212
|
+
<div resize="right" dnd-exclude></div>
|
|
211
213
|
</div>
|
|
212
214
|
</div>
|
|
213
215
|
|
|
@@ -224,8 +226,8 @@
|
|
|
224
226
|
</main>
|
|
225
227
|
|
|
226
228
|
|
|
227
|
-
|
|
228
|
-
<script src="../../../CoCreateJS/dist/CoCreate.js"></script>
|
|
229
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
|
230
|
+
<!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
|
|
229
231
|
|
|
230
232
|
</body>
|
|
231
233
|
|
package/demo/index.html
CHANGED
|
@@ -25,16 +25,6 @@
|
|
|
25
25
|
background: #dddddd;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.resize2 {
|
|
29
|
-
top: 150px;
|
|
30
|
-
left: 150px;
|
|
31
|
-
width: 50px;
|
|
32
|
-
height: 50px;
|
|
33
|
-
padding: 0.5em;
|
|
34
|
-
position: absolute;
|
|
35
|
-
background: #dddddd;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
28
|
.resize3 {
|
|
39
29
|
top: 250px;
|
|
40
30
|
left: 250px;
|
|
@@ -44,29 +34,20 @@
|
|
|
44
34
|
position: absolute;
|
|
45
35
|
background: #dddddd;
|
|
46
36
|
}
|
|
47
|
-
.resize4 {
|
|
48
|
-
top: 350px;
|
|
49
|
-
left: 350px;
|
|
50
|
-
width: 50px;
|
|
51
|
-
height: 50px;
|
|
52
|
-
padding: 0.5em;
|
|
53
|
-
position: absolute;
|
|
54
|
-
background: #dddddd;
|
|
55
|
-
}
|
|
56
37
|
</style>
|
|
57
38
|
</head>
|
|
58
39
|
|
|
59
40
|
<body>
|
|
60
41
|
|
|
61
42
|
<!--<div class="">-->
|
|
62
|
-
<div class="position:fixed height:100vh width:300px right:0px background:whitesmoke" resizable>
|
|
43
|
+
<!-- <div class="position:fixed height:100vh width:300px right:0px background:whitesmoke" resizable>
|
|
63
44
|
<div resize="left"></div>
|
|
64
45
|
<div resize="right"></div>
|
|
65
46
|
<div resize="top"></div>
|
|
66
47
|
<div resize="bottom"></div>
|
|
67
|
-
</div>
|
|
48
|
+
</div> -->
|
|
68
49
|
|
|
69
|
-
<div class="resize
|
|
50
|
+
<div class="resize resize1" resizable>
|
|
70
51
|
<div resize="left"></div>
|
|
71
52
|
<div resize="right"></div>
|
|
72
53
|
<div resize="top"></div>
|
|
@@ -75,8 +56,8 @@
|
|
|
75
56
|
<!--</div>-->
|
|
76
57
|
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
<script src="../../../CoCreateJS/dist/CoCreate.js" ></script>
|
|
59
|
+
<script src="../dist/CoCreate-resize.js"></script>
|
|
60
|
+
<!-- <script src="../../../CoCreateJS/dist/CoCreate.js" ></script> -->
|
|
80
61
|
</body>
|
|
81
62
|
|
|
82
63
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/resize",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"resize",
|
package/src/index.js
CHANGED
|
@@ -52,8 +52,6 @@ CoCreateResize.prototype = {
|
|
|
52
52
|
this.isGrid = this.detectGrid();
|
|
53
53
|
this.gridWidth = 0;
|
|
54
54
|
this.gridHeight = 0;
|
|
55
|
-
// this.missingWidth = 0;
|
|
56
|
-
// this.missingHeight = 0;
|
|
57
55
|
this.limitSpan = 0;
|
|
58
56
|
this.widthSpan = 0;
|
|
59
57
|
this.heightSpan = 0;
|
|
@@ -75,11 +73,9 @@ CoCreateResize.prototype = {
|
|
|
75
73
|
getGridProperty: function() {
|
|
76
74
|
if(!this.resizeWidget.parentNode) return;
|
|
77
75
|
let compStyles = window.getComputedStyle(this.resizeWidget.parentNode);
|
|
78
|
-
// let currentCompStyles = window.getComputedStyle(this.resizeWidget);
|
|
79
76
|
let gridColumns = compStyles.gridTemplateColumns;
|
|
80
77
|
let height = compStyles.gridAutoRows;
|
|
81
78
|
|
|
82
|
-
// console.log(compStyles)
|
|
83
79
|
if(gridColumns !== 'none') {
|
|
84
80
|
let width = gridColumns.split(' ');
|
|
85
81
|
this.limitSpan = width.length;
|
|
@@ -87,12 +83,6 @@ CoCreateResize.prototype = {
|
|
|
87
83
|
this.gridRowGap = Number.parseInt(compStyles.gridRowGap);
|
|
88
84
|
this.gridWidth = Number.parseFloat(width[0]);
|
|
89
85
|
this.gridHeight = Number.parseInt(height);
|
|
90
|
-
// this.missingWidth = Number.parseInt(currentCompStyles.paddingRight) + Number.parseInt(currentCompStyles.paddingLeft)
|
|
91
|
-
// + Number.parseInt(currentCompStyles.marginRight) + Number.parseInt(currentCompStyles.marginLeft)
|
|
92
|
-
// + Number.parseInt(currentCompStyles.borderRight) + Number.parseInt(currentCompStyles.borderLeft);
|
|
93
|
-
// this.missingHeight = Number.parseInt(currentCompStyles.paddingTop) + Number.parseInt(currentCompStyles.paddingBottom)
|
|
94
|
-
// + Number.parseInt(currentCompStyles.marginTop) + Number.parseInt(currentCompStyles.marginBottom)
|
|
95
|
-
// + Number.parseInt(currentCompStyles.borderTop) + Number.parseInt(currentCompStyles.borderBottom);
|
|
96
86
|
}
|
|
97
87
|
},
|
|
98
88
|
|
|
@@ -126,15 +116,29 @@ CoCreateResize.prototype = {
|
|
|
126
116
|
},
|
|
127
117
|
|
|
128
118
|
initResize: function() {
|
|
129
|
-
DIRECTIONS.map(d => {
|
|
119
|
+
DIRECTIONS.map(d => {
|
|
120
|
+
if (this.Drags[d])
|
|
121
|
+
this.addListenerMulti(this.Drags[d], EVENTS[0], this.checkCorners[d]);
|
|
122
|
+
console.log('checkCorner', this.checkCorners[d])
|
|
123
|
+
console.log('drags', this.Drags[d])
|
|
124
|
+
});
|
|
130
125
|
},
|
|
131
126
|
|
|
132
127
|
checkDragImplementation: function(e, from, to, offset, fcur, scur) {
|
|
133
128
|
if (e.touches)
|
|
134
129
|
e = e.touches[0];
|
|
135
|
-
|
|
130
|
+
let other;
|
|
131
|
+
if (to == 'top')
|
|
132
|
+
other = 'bottom'
|
|
133
|
+
else if (to == 'bottom')
|
|
134
|
+
other = 'top'
|
|
135
|
+
else if (to == 'left')
|
|
136
|
+
other = 'right'
|
|
137
|
+
else if (to == 'right')
|
|
138
|
+
other = 'left'
|
|
136
139
|
this.removeListenerMulti(this.Drags[from], EVENTS[1], this.initDrags[from]);
|
|
137
140
|
this.removeListenerMulti(this.Drags[from], EVENTS[1], this.initDrags[to]);
|
|
141
|
+
this.removeListenerMulti(this.Drags[from], EVENTS[1], this.initDrags[other]);
|
|
138
142
|
this.addListenerMulti(this.Drags[from], EVENTS[1], this.initDrags[from]);
|
|
139
143
|
|
|
140
144
|
if (offset < this.cornerSize && this.Drags[to]) {
|
|
@@ -147,6 +151,12 @@ CoCreateResize.prototype = {
|
|
|
147
151
|
},
|
|
148
152
|
|
|
149
153
|
initDrag: function(e, idx) {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
|
|
156
|
+
if (!this.resizeWidget.hasAttribute('resizing')){
|
|
157
|
+
this.resizeWidget.setAttribute('resizing', '')
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
let selector = document.defaultView.getComputedStyle(this.resizeWidget);
|
|
151
161
|
this.processIframe();
|
|
152
162
|
|
|
@@ -175,23 +185,28 @@ CoCreateResize.prototype = {
|
|
|
175
185
|
|
|
176
186
|
initTopDrag: function(e) {
|
|
177
187
|
this.initDrag(e, 'top');
|
|
188
|
+
console.log('resize-top')
|
|
178
189
|
},
|
|
179
190
|
initBottomDrag: function(e) {
|
|
180
191
|
this.initDrag(e, 'bottom');
|
|
192
|
+
console.log('resize-bottom')
|
|
181
193
|
},
|
|
182
194
|
initLeftDrag: function(e) {
|
|
183
195
|
this.initDrag(e, 'left');
|
|
196
|
+
console.log('resize-left')
|
|
197
|
+
|
|
184
198
|
},
|
|
185
199
|
initRightDrag: function(e) {
|
|
186
200
|
this.initDrag(e, 'right');
|
|
201
|
+
console.log('resize-right')
|
|
187
202
|
},
|
|
188
203
|
|
|
189
204
|
//this is just for grid system
|
|
190
205
|
setRowEnd: function(height) {
|
|
191
206
|
if(this.gridHeight) {
|
|
192
207
|
this.heightSpan = Math.ceil((height - (this.heightSpan - 1) * this.gridRowGap) / this.gridHeight );
|
|
193
|
-
// this.heightSpan = Math.ceil((height + this.missingHeight) / this.gridHeight);
|
|
194
208
|
this.resizeWidget.style['grid-row-end'] = 'span ' + this.heightSpan;
|
|
209
|
+
this.collaborate({rowEnd: this.heightSpan})
|
|
195
210
|
}
|
|
196
211
|
},
|
|
197
212
|
|
|
@@ -203,20 +218,19 @@ CoCreateResize.prototype = {
|
|
|
203
218
|
top = this.startTop + e.clientY - this.startY;
|
|
204
219
|
height = this.startHeight - e.clientY + this.startY;
|
|
205
220
|
|
|
206
|
-
if (
|
|
221
|
+
if (height < 10)
|
|
207
222
|
return;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
223
|
+
if (!this.isGrid) {
|
|
224
|
+
this.resizeWidget.style.top = top + 'px';
|
|
225
|
+
this.collaborate({top, height})
|
|
226
|
+
}
|
|
212
227
|
this.resizeWidget.style.height = height + 'px';
|
|
213
|
-
|
|
214
228
|
this.setRowEnd(height);
|
|
215
229
|
},
|
|
216
230
|
|
|
217
231
|
|
|
218
232
|
doBottomDrag: function(e) {
|
|
219
|
-
let height
|
|
233
|
+
let height;
|
|
220
234
|
|
|
221
235
|
if (e.touches)
|
|
222
236
|
e = e.touches[0];
|
|
@@ -225,10 +239,9 @@ CoCreateResize.prototype = {
|
|
|
225
239
|
|
|
226
240
|
if (height < 10)
|
|
227
241
|
return;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
this.resizeWidget.style.bottom = null;
|
|
242
|
+
if (!this.isGrid)
|
|
243
|
+
this.collaborate({height})
|
|
244
|
+
|
|
232
245
|
this.resizeWidget.style.height = height + 'px';
|
|
233
246
|
this.setRowEnd(height);
|
|
234
247
|
},
|
|
@@ -239,6 +252,7 @@ CoCreateResize.prototype = {
|
|
|
239
252
|
let spans = Math.ceil((width - (this.widthSpan - 1) * this.gridColumnGap) / this.gridWidth);
|
|
240
253
|
this.widthSpan = (spans > this.limitSpan) ? this.limitSpan : spans;
|
|
241
254
|
this.resizeWidget.style['grid-column-end'] = 'span ' + this.widthSpan;
|
|
255
|
+
this.collaborate({columnEnd: this.widthSpan})
|
|
242
256
|
}
|
|
243
257
|
},
|
|
244
258
|
|
|
@@ -252,30 +266,28 @@ CoCreateResize.prototype = {
|
|
|
252
266
|
|
|
253
267
|
if (width < 10)
|
|
254
268
|
return;
|
|
255
|
-
if (!this.isGrid)
|
|
269
|
+
if (!this.isGrid) {
|
|
256
270
|
this.resizeWidget.style.left = left + 'px';
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
// this.resizeWidget.style.left = null;
|
|
260
|
-
this.resizeWidget.style.width = width + 'px';
|
|
271
|
+
this.collaborate({left, width})
|
|
272
|
+
}
|
|
261
273
|
|
|
274
|
+
this.resizeWidget.style.width = width + 'px';
|
|
262
275
|
this.setColumnEnd(width);
|
|
263
276
|
},
|
|
264
277
|
|
|
265
278
|
|
|
266
279
|
doRightDrag: function(e) {
|
|
267
|
-
let width
|
|
280
|
+
let width;
|
|
268
281
|
if (e.touches)
|
|
269
282
|
e = e.touches[0];
|
|
270
283
|
width = this.startWidth + e.clientX - this.startX;
|
|
271
284
|
if (width < 10)
|
|
272
285
|
return;
|
|
273
|
-
|
|
274
|
-
let compStyles = window.getComputedStyle(this.resizeWidget);
|
|
275
|
-
this.resizeWidget.style.left = compStyles.left;
|
|
276
|
-
this.resizeWidget.style.right = null;
|
|
277
|
-
this.resizeWidget.style.width = width + 'px';
|
|
278
286
|
|
|
287
|
+
if (!this.isGrid)
|
|
288
|
+
this.collaborate({width})
|
|
289
|
+
|
|
290
|
+
this.resizeWidget.style.width = width + 'px';
|
|
279
291
|
this.setColumnEnd(width);
|
|
280
292
|
},
|
|
281
293
|
|
|
@@ -293,6 +305,9 @@ CoCreateResize.prototype = {
|
|
|
293
305
|
document.querySelectorAll('iframe').forEach(function(item) {
|
|
294
306
|
item.style.pointerEvents = null;
|
|
295
307
|
});
|
|
308
|
+
if (this.resizeWidget.hasAttribute('resizing')){
|
|
309
|
+
this.resizeWidget.removeAttribute('resizing', '')
|
|
310
|
+
}
|
|
296
311
|
|
|
297
312
|
//this is just for grid system
|
|
298
313
|
if(this.detectGrid()) {
|
|
@@ -308,21 +323,41 @@ CoCreateResize.prototype = {
|
|
|
308
323
|
DIRECTIONS.map(d => { this.removeListenerMulti(document.documentElement, EVENTS[0], this.doDrags[d]) });
|
|
309
324
|
this.removeListenerMulti(document.documentElement, EVENTS[2], this.stopDrag);
|
|
310
325
|
},
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
326
|
+
checkLeftCorners: function(e) {
|
|
327
|
+
let offset = e.clientY - this.getDistance(this.Drags['left'], true) + document.documentElement.scrollTop;
|
|
328
|
+
if (offset > 10) {
|
|
329
|
+
offset = this.getDistance(this.Drags['left'], true) + this.Drags['left'].clientHeight - e.clientY - document.documentElement.scrollTop;
|
|
330
|
+
this.checkDragImplementation(e, 'left', 'bottom', offset, 'ne-resize', 'e-resize');
|
|
331
|
+
} else {
|
|
332
|
+
this.checkDragImplementation(e, 'left', 'top', offset, 'se-resize', 'e-resize');
|
|
333
|
+
}
|
|
314
334
|
},
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
335
|
+
checkTopCorners: function(e) {
|
|
336
|
+
let offset = e.clientX - this.getDistance(this.Drags['top'], false) + document.documentElement.scrollTop;
|
|
337
|
+
if (offset > 10) {
|
|
338
|
+
offset = this.getDistance(this.Drags['top'], false) + this.Drags['top'].clientWidth - e.clientX - document.documentElement.scrollLeft;
|
|
339
|
+
this.checkDragImplementation(e, 'top', 'right', offset, 'ne-resize', 's-resize');
|
|
340
|
+
} else {
|
|
341
|
+
this.checkDragImplementation(e, 'top', 'left', offset, 'se-resize', 's-resize');
|
|
342
|
+
}
|
|
318
343
|
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
344
|
+
checkBottomCorners: function(e) {
|
|
345
|
+
let offset = e.clientX - this.getDistance(this.Drags['bottom'], false) + document.documentElement.scrollTop;
|
|
346
|
+
if (offset > 10) {
|
|
347
|
+
offset = this.getDistance(this.Drags['bottom'], false) + this.Drags['bottom'].clientWidth - e.clientX - document.documentElement.scrollLeft;
|
|
348
|
+
this.checkDragImplementation(e, 'bottom', 'right', offset, 'se-resize', 's-resize');
|
|
349
|
+
} else {
|
|
350
|
+
this.checkDragImplementation(e, 'bottom', 'left', offset, 'ne-resize', 's-resize');
|
|
351
|
+
}
|
|
322
352
|
},
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
353
|
+
checkRightCorners: function(e) {
|
|
354
|
+
let offset = e.clientY - this.getDistance(this.Drags['right'], true) + document.documentElement.scrollTop;
|
|
355
|
+
if (offset > 10) {
|
|
356
|
+
offset = this.getDistance(this.Drags['right'], true) + this.Drags['right'].clientHeight - e.clientY - document.documentElement.scrollTop;
|
|
357
|
+
this.checkDragImplementation(e, 'right', 'bottom', offset, 'se-resize', 'e-resize');
|
|
358
|
+
} else {
|
|
359
|
+
this.checkDragImplementation(e, 'right', 'top', offset, 'ne-resize', 'e-resize');
|
|
360
|
+
}
|
|
326
361
|
},
|
|
327
362
|
|
|
328
363
|
bindListeners: function() {
|
|
@@ -333,10 +368,10 @@ CoCreateResize.prototype = {
|
|
|
333
368
|
|
|
334
369
|
this.stopDrag = this.stopDrag.bind(this);
|
|
335
370
|
|
|
336
|
-
this.checkCorners['left'] = this.
|
|
337
|
-
this.checkCorners['top'] = this.
|
|
338
|
-
this.checkCorners['bottom'] = this.
|
|
339
|
-
this.checkCorners['right'] = this.
|
|
371
|
+
this.checkCorners['left'] = this.checkLeftCorners.bind(this);
|
|
372
|
+
this.checkCorners['top'] = this.checkTopCorners.bind(this);
|
|
373
|
+
this.checkCorners['bottom'] = this.checkBottomCorners.bind(this);
|
|
374
|
+
this.checkCorners['right'] = this.checkRightCorners.bind(this);
|
|
340
375
|
|
|
341
376
|
this.initDrags['top'] = this.initTopDrag.bind(this);
|
|
342
377
|
this.initDrags['left'] = this.initLeftDrag.bind(this);
|
|
@@ -377,6 +412,38 @@ CoCreateResize.prototype = {
|
|
|
377
412
|
document.querySelectorAll('iframe').forEach(function(item) {
|
|
378
413
|
item.style.pointerEvents = null;
|
|
379
414
|
});
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
collaborate: function({left, top, width, height, rowEnd, columnEnd}) {
|
|
418
|
+
if (window.CoCreate && window.CoCreate.text) {
|
|
419
|
+
let domTextEditor = this.resizeWidget.closest('[contenteditable]');
|
|
420
|
+
if (domTextEditor){
|
|
421
|
+
if (left)
|
|
422
|
+
CoCreate.text.setStyle({
|
|
423
|
+
domTextEditor, target: this.resizeWidget, property: 'left', value: left + 'px'
|
|
424
|
+
})
|
|
425
|
+
if (top)
|
|
426
|
+
CoCreate.text.setStyle({
|
|
427
|
+
domTextEditor, target: this.resizeWidget, property: 'top', value: top + 'px'
|
|
428
|
+
})
|
|
429
|
+
if (width)
|
|
430
|
+
CoCreate.text.setStyle({
|
|
431
|
+
domTextEditor, target: this.resizeWidget, property: 'width', value: width + 'px'
|
|
432
|
+
})
|
|
433
|
+
if (height)
|
|
434
|
+
CoCreate.text.setStyle({
|
|
435
|
+
domTextEditor, target: this.resizeWidget, property: 'height', value: height + 'px'
|
|
436
|
+
})
|
|
437
|
+
if (rowEnd)
|
|
438
|
+
CoCreate.text.setStyle({
|
|
439
|
+
domTextEditor, target: this.resizeWidget, property: 'grid-row-end', value: 'span ' + rowEnd
|
|
440
|
+
})
|
|
441
|
+
if (columnEnd)
|
|
442
|
+
CoCreate.text.setStyle({
|
|
443
|
+
domTextEditor, target: this.resizeWidget, property: 'grid-column-end', value: 'span ' + columnEnd
|
|
444
|
+
})
|
|
445
|
+
}
|
|
446
|
+
}
|
|
380
447
|
}
|
|
381
448
|
};
|
|
382
449
|
|