@rosepetal/node-red-contrib-image-tools 1.6.3 → 1.6.4
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/node-red-contrib-image-tools/nodes/blend/add-bbs.html +11 -4
- package/node-red-contrib-image-tools/nodes/blend/add-mask.html +11 -4
- package/node-red-contrib-image-tools/nodes/blend/add-masks.html +11 -4
- package/node-red-contrib-image-tools/nodes/blend/blend.html +11 -4
- package/node-red-contrib-image-tools/nodes/io/image-out.html +11 -4
- package/node-red-contrib-image-tools/nodes/mix/advanced-mosaic.html +11 -4
- package/node-red-contrib-image-tools/nodes/mix/concat.html +11 -4
- package/node-red-contrib-image-tools/nodes/mix/mosaic.html +11 -4
- package/node-red-contrib-image-tools/nodes/specialized/image-align.html +3 -2
- package/node-red-contrib-image-tools/nodes/transform/crop.html +11 -4
- package/node-red-contrib-image-tools/nodes/transform/filter.html +11 -4
- package/node-red-contrib-image-tools/nodes/transform/padding.html +11 -4
- package/node-red-contrib-image-tools/nodes/transform/resize.html +3 -3
- package/node-red-contrib-image-tools/nodes/transform/rotate.html +11 -4
- package/npm/darwin-arm64/package.json +1 -1
- package/npm/darwin-x64/package.json +1 -1
- package/npm/linux-arm64/package.json +1 -1
- package/npm/linux-x64/package.json +1 -1
- package/npm/linuxmusl-x64/package.json +1 -1
- package/npm/win32-x64/package.json +1 -1
- package/package.json +6 -6
|
@@ -326,6 +326,10 @@
|
|
|
326
326
|
const nodeElement = document.getElementById(nodeId);
|
|
327
327
|
if (!nodeElement) return;
|
|
328
328
|
|
|
329
|
+
// Size to the server-resized debug image (no display cap)
|
|
330
|
+
var debugWidth = data.debugWidth || 200;
|
|
331
|
+
var debugHeight = data.debugHeight || 200;
|
|
332
|
+
|
|
329
333
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
330
334
|
|
|
331
335
|
if (!debugContainer) {
|
|
@@ -334,8 +338,8 @@
|
|
|
334
338
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
335
339
|
debugContainer.setAttribute('x', '70');
|
|
336
340
|
debugContainer.setAttribute('y', '5');
|
|
337
|
-
debugContainer.setAttribute('width',
|
|
338
|
-
debugContainer.setAttribute('height',
|
|
341
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
342
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
339
343
|
debugContainer.style.overflow = 'visible';
|
|
340
344
|
|
|
341
345
|
// Create simple image directly inside foreignObject
|
|
@@ -345,8 +349,8 @@
|
|
|
345
349
|
img.style.height = 'auto';
|
|
346
350
|
img.style.display = 'block';
|
|
347
351
|
img.style.cursor = 'pointer';
|
|
348
|
-
img.style.maxHeight = '
|
|
349
|
-
img.style.maxWidth = '
|
|
352
|
+
img.style.maxHeight = 'none';
|
|
353
|
+
img.style.maxWidth = 'none';
|
|
350
354
|
|
|
351
355
|
img.onclick = function() {
|
|
352
356
|
removeDebugImage(nodeId);
|
|
@@ -354,6 +358,9 @@
|
|
|
354
358
|
|
|
355
359
|
debugContainer.appendChild(img);
|
|
356
360
|
nodeElement.appendChild(debugContainer);
|
|
361
|
+
} else {
|
|
362
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
363
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
357
364
|
}
|
|
358
365
|
|
|
359
366
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -145,6 +145,10 @@
|
|
|
145
145
|
|
|
146
146
|
const nodeElement = document.getElementById(nodeId);
|
|
147
147
|
if (!nodeElement) return;
|
|
148
|
+
|
|
149
|
+
// Size to the server-resized debug image (no display cap)
|
|
150
|
+
var debugWidth = data.debugWidth || 200;
|
|
151
|
+
var debugHeight = data.debugHeight || 200;
|
|
148
152
|
|
|
149
153
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
150
154
|
|
|
@@ -154,8 +158,8 @@
|
|
|
154
158
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
155
159
|
debugContainer.setAttribute('x', '70');
|
|
156
160
|
debugContainer.setAttribute('y', '5');
|
|
157
|
-
debugContainer.setAttribute('width',
|
|
158
|
-
debugContainer.setAttribute('height',
|
|
161
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
162
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
159
163
|
debugContainer.style.overflow = 'visible';
|
|
160
164
|
|
|
161
165
|
// Create simple image directly inside foreignObject
|
|
@@ -165,8 +169,8 @@
|
|
|
165
169
|
img.style.height = 'auto';
|
|
166
170
|
img.style.display = 'block';
|
|
167
171
|
img.style.cursor = 'pointer';
|
|
168
|
-
img.style.maxHeight = '
|
|
169
|
-
img.style.maxWidth = '
|
|
172
|
+
img.style.maxHeight = 'none';
|
|
173
|
+
img.style.maxWidth = 'none';
|
|
170
174
|
|
|
171
175
|
img.onclick = function() {
|
|
172
176
|
removeDebugImage(nodeId);
|
|
@@ -174,6 +178,9 @@
|
|
|
174
178
|
|
|
175
179
|
debugContainer.appendChild(img);
|
|
176
180
|
nodeElement.appendChild(debugContainer);
|
|
181
|
+
} else {
|
|
182
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
183
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
177
184
|
}
|
|
178
185
|
|
|
179
186
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -475,6 +475,10 @@
|
|
|
475
475
|
const nodeElement = document.getElementById(nodeId);
|
|
476
476
|
if (!nodeElement) return;
|
|
477
477
|
|
|
478
|
+
// Size to the server-resized debug image (no display cap)
|
|
479
|
+
var debugWidth = data.debugWidth || 200;
|
|
480
|
+
var debugHeight = data.debugHeight || 200;
|
|
481
|
+
|
|
478
482
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
479
483
|
|
|
480
484
|
if (!debugContainer) {
|
|
@@ -483,8 +487,8 @@
|
|
|
483
487
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
484
488
|
debugContainer.setAttribute('x', '70');
|
|
485
489
|
debugContainer.setAttribute('y', '5');
|
|
486
|
-
debugContainer.setAttribute('width',
|
|
487
|
-
debugContainer.setAttribute('height',
|
|
490
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
491
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
488
492
|
debugContainer.style.overflow = 'visible';
|
|
489
493
|
|
|
490
494
|
// Create simple image directly inside foreignObject
|
|
@@ -494,8 +498,8 @@
|
|
|
494
498
|
img.style.height = 'auto';
|
|
495
499
|
img.style.display = 'block';
|
|
496
500
|
img.style.cursor = 'pointer';
|
|
497
|
-
img.style.maxHeight = '
|
|
498
|
-
img.style.maxWidth = '
|
|
501
|
+
img.style.maxHeight = 'none';
|
|
502
|
+
img.style.maxWidth = 'none';
|
|
499
503
|
|
|
500
504
|
img.onclick = function() {
|
|
501
505
|
removeDebugImage(nodeId);
|
|
@@ -503,6 +507,9 @@
|
|
|
503
507
|
|
|
504
508
|
debugContainer.appendChild(img);
|
|
505
509
|
nodeElement.appendChild(debugContainer);
|
|
510
|
+
} else {
|
|
511
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
512
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
506
513
|
}
|
|
507
514
|
|
|
508
515
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -198,6 +198,10 @@
|
|
|
198
198
|
|
|
199
199
|
const nodeElement = document.getElementById(nodeId);
|
|
200
200
|
if (!nodeElement) return;
|
|
201
|
+
|
|
202
|
+
// Size to the server-resized debug image (no display cap)
|
|
203
|
+
var debugWidth = data.debugWidth || 200;
|
|
204
|
+
var debugHeight = data.debugHeight || 200;
|
|
201
205
|
|
|
202
206
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
203
207
|
|
|
@@ -207,8 +211,8 @@
|
|
|
207
211
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
208
212
|
debugContainer.setAttribute('x', '70');
|
|
209
213
|
debugContainer.setAttribute('y', '5');
|
|
210
|
-
debugContainer.setAttribute('width',
|
|
211
|
-
debugContainer.setAttribute('height',
|
|
214
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
215
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
212
216
|
debugContainer.style.overflow = 'visible';
|
|
213
217
|
|
|
214
218
|
// Create simple image directly inside foreignObject
|
|
@@ -218,8 +222,8 @@
|
|
|
218
222
|
img.style.height = 'auto';
|
|
219
223
|
img.style.display = 'block';
|
|
220
224
|
img.style.cursor = 'pointer';
|
|
221
|
-
img.style.maxHeight = '
|
|
222
|
-
img.style.maxWidth = '
|
|
225
|
+
img.style.maxHeight = 'none';
|
|
226
|
+
img.style.maxWidth = 'none';
|
|
223
227
|
|
|
224
228
|
img.onclick = function() {
|
|
225
229
|
removeDebugImage(nodeId);
|
|
@@ -227,6 +231,9 @@
|
|
|
227
231
|
|
|
228
232
|
debugContainer.appendChild(img);
|
|
229
233
|
nodeElement.appendChild(debugContainer);
|
|
234
|
+
} else {
|
|
235
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
236
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
230
237
|
}
|
|
231
238
|
|
|
232
239
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -288,6 +288,10 @@
|
|
|
288
288
|
var nodeElement = document.getElementById(nodeId);
|
|
289
289
|
if (!nodeElement) return;
|
|
290
290
|
|
|
291
|
+
// Size to the server-resized debug image (no display cap)
|
|
292
|
+
var debugWidth = data.debugWidth || 200;
|
|
293
|
+
var debugHeight = data.debugHeight || 200;
|
|
294
|
+
|
|
291
295
|
var debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
292
296
|
|
|
293
297
|
if (!debugContainer) {
|
|
@@ -295,8 +299,8 @@
|
|
|
295
299
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
296
300
|
debugContainer.setAttribute('x', '70');
|
|
297
301
|
debugContainer.setAttribute('y', '5');
|
|
298
|
-
debugContainer.setAttribute('width',
|
|
299
|
-
debugContainer.setAttribute('height',
|
|
302
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
303
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
300
304
|
debugContainer.style.overflow = 'visible';
|
|
301
305
|
|
|
302
306
|
var img = document.createElement('img');
|
|
@@ -305,8 +309,8 @@
|
|
|
305
309
|
img.style.height = 'auto';
|
|
306
310
|
img.style.display = 'block';
|
|
307
311
|
img.style.cursor = 'pointer';
|
|
308
|
-
img.style.maxHeight = '
|
|
309
|
-
img.style.maxWidth = '
|
|
312
|
+
img.style.maxHeight = 'none';
|
|
313
|
+
img.style.maxWidth = 'none';
|
|
310
314
|
|
|
311
315
|
img.onclick = function() {
|
|
312
316
|
removeDebugImage(nodeId);
|
|
@@ -314,6 +318,9 @@
|
|
|
314
318
|
|
|
315
319
|
debugContainer.appendChild(img);
|
|
316
320
|
nodeElement.appendChild(debugContainer);
|
|
321
|
+
} else {
|
|
322
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
323
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
317
324
|
}
|
|
318
325
|
|
|
319
326
|
var imgEl = document.getElementById('debug-img-' + nodeId);
|
|
@@ -1745,6 +1745,10 @@
|
|
|
1745
1745
|
|
|
1746
1746
|
const nodeElement = document.getElementById(nodeId);
|
|
1747
1747
|
if (!nodeElement) return;
|
|
1748
|
+
|
|
1749
|
+
// Size to the server-resized debug image (no display cap)
|
|
1750
|
+
var debugWidth = data.debugWidth || 200;
|
|
1751
|
+
var debugHeight = data.debugHeight || 200;
|
|
1748
1752
|
|
|
1749
1753
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
1750
1754
|
|
|
@@ -1754,8 +1758,8 @@
|
|
|
1754
1758
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
1755
1759
|
debugContainer.setAttribute('x', '70');
|
|
1756
1760
|
debugContainer.setAttribute('y', '5');
|
|
1757
|
-
debugContainer.setAttribute('width',
|
|
1758
|
-
debugContainer.setAttribute('height',
|
|
1761
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
1762
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
1759
1763
|
debugContainer.style.overflow = 'visible';
|
|
1760
1764
|
|
|
1761
1765
|
// Create simple image directly inside foreignObject
|
|
@@ -1765,8 +1769,8 @@
|
|
|
1765
1769
|
img.style.height = 'auto';
|
|
1766
1770
|
img.style.display = 'block';
|
|
1767
1771
|
img.style.cursor = 'pointer';
|
|
1768
|
-
img.style.maxHeight = '
|
|
1769
|
-
img.style.maxWidth = '
|
|
1772
|
+
img.style.maxHeight = 'none';
|
|
1773
|
+
img.style.maxWidth = 'none';
|
|
1770
1774
|
|
|
1771
1775
|
img.onclick = function() {
|
|
1772
1776
|
removeDebugImage(nodeId);
|
|
@@ -1774,6 +1778,9 @@
|
|
|
1774
1778
|
|
|
1775
1779
|
debugContainer.appendChild(img);
|
|
1776
1780
|
nodeElement.appendChild(debugContainer);
|
|
1781
|
+
} else {
|
|
1782
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
1783
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
1777
1784
|
}
|
|
1778
1785
|
|
|
1779
1786
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -143,6 +143,10 @@
|
|
|
143
143
|
|
|
144
144
|
const nodeElement = document.getElementById(nodeId);
|
|
145
145
|
if (!nodeElement) return;
|
|
146
|
+
|
|
147
|
+
// Size to the server-resized debug image (no display cap)
|
|
148
|
+
var debugWidth = data.debugWidth || 200;
|
|
149
|
+
var debugHeight = data.debugHeight || 200;
|
|
146
150
|
|
|
147
151
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
148
152
|
|
|
@@ -152,8 +156,8 @@
|
|
|
152
156
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
153
157
|
debugContainer.setAttribute('x', '70');
|
|
154
158
|
debugContainer.setAttribute('y', '5');
|
|
155
|
-
debugContainer.setAttribute('width',
|
|
156
|
-
debugContainer.setAttribute('height',
|
|
159
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
160
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
157
161
|
debugContainer.style.overflow = 'visible';
|
|
158
162
|
|
|
159
163
|
// Create simple image directly inside foreignObject
|
|
@@ -163,8 +167,8 @@
|
|
|
163
167
|
img.style.height = 'auto';
|
|
164
168
|
img.style.display = 'block';
|
|
165
169
|
img.style.cursor = 'pointer';
|
|
166
|
-
img.style.maxHeight = '
|
|
167
|
-
img.style.maxWidth = '
|
|
170
|
+
img.style.maxHeight = 'none';
|
|
171
|
+
img.style.maxWidth = 'none';
|
|
168
172
|
|
|
169
173
|
img.onclick = function() {
|
|
170
174
|
removeDebugImage(nodeId);
|
|
@@ -172,6 +176,9 @@
|
|
|
172
176
|
|
|
173
177
|
debugContainer.appendChild(img);
|
|
174
178
|
nodeElement.appendChild(debugContainer);
|
|
179
|
+
} else {
|
|
180
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
181
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -237,6 +237,10 @@
|
|
|
237
237
|
|
|
238
238
|
const nodeElement = document.getElementById(nodeId);
|
|
239
239
|
if (!nodeElement) return;
|
|
240
|
+
|
|
241
|
+
// Size to the server-resized debug image (no display cap)
|
|
242
|
+
var debugWidth = data.debugWidth || 200;
|
|
243
|
+
var debugHeight = data.debugHeight || 200;
|
|
240
244
|
|
|
241
245
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
242
246
|
|
|
@@ -246,8 +250,8 @@
|
|
|
246
250
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
247
251
|
debugContainer.setAttribute('x', '70');
|
|
248
252
|
debugContainer.setAttribute('y', '5');
|
|
249
|
-
debugContainer.setAttribute('width',
|
|
250
|
-
debugContainer.setAttribute('height',
|
|
253
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
254
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
251
255
|
debugContainer.style.overflow = 'visible';
|
|
252
256
|
|
|
253
257
|
// Create simple image directly inside foreignObject
|
|
@@ -257,8 +261,8 @@
|
|
|
257
261
|
img.style.height = 'auto';
|
|
258
262
|
img.style.display = 'block';
|
|
259
263
|
img.style.cursor = 'pointer';
|
|
260
|
-
img.style.maxHeight = '
|
|
261
|
-
img.style.maxWidth = '
|
|
264
|
+
img.style.maxHeight = 'none';
|
|
265
|
+
img.style.maxWidth = 'none';
|
|
262
266
|
|
|
263
267
|
img.onclick = function() {
|
|
264
268
|
removeDebugImage(nodeId);
|
|
@@ -266,6 +270,9 @@
|
|
|
266
270
|
|
|
267
271
|
debugContainer.appendChild(img);
|
|
268
272
|
nodeElement.appendChild(debugContainer);
|
|
273
|
+
} else {
|
|
274
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
275
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
269
276
|
}
|
|
270
277
|
|
|
271
278
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -335,8 +335,9 @@
|
|
|
335
335
|
|
|
336
336
|
const debugWidth = data.debugWidth || 200;
|
|
337
337
|
const debugHeight = data.debugHeight || 200;
|
|
338
|
-
|
|
339
|
-
const
|
|
338
|
+
// Display at the server-resized debug dimensions (no display cap)
|
|
339
|
+
const maxDisplayWidth = debugWidth;
|
|
340
|
+
const displayHeight = debugHeight;
|
|
340
341
|
|
|
341
342
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
342
343
|
|
|
@@ -170,6 +170,10 @@
|
|
|
170
170
|
|
|
171
171
|
const nodeElement = document.getElementById(nodeId);
|
|
172
172
|
if (!nodeElement) return;
|
|
173
|
+
|
|
174
|
+
// Size to the server-resized debug image (no display cap)
|
|
175
|
+
var debugWidth = data.debugWidth || 200;
|
|
176
|
+
var debugHeight = data.debugHeight || 200;
|
|
173
177
|
|
|
174
178
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
175
179
|
|
|
@@ -179,8 +183,8 @@
|
|
|
179
183
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
180
184
|
debugContainer.setAttribute('x', '70');
|
|
181
185
|
debugContainer.setAttribute('y', '5');
|
|
182
|
-
debugContainer.setAttribute('width',
|
|
183
|
-
debugContainer.setAttribute('height',
|
|
186
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
187
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
184
188
|
debugContainer.style.overflow = 'visible';
|
|
185
189
|
|
|
186
190
|
// Create simple image directly inside foreignObject
|
|
@@ -190,8 +194,8 @@
|
|
|
190
194
|
img.style.height = 'auto';
|
|
191
195
|
img.style.display = 'block';
|
|
192
196
|
img.style.cursor = 'pointer';
|
|
193
|
-
img.style.maxHeight = '
|
|
194
|
-
img.style.maxWidth = '
|
|
197
|
+
img.style.maxHeight = 'none';
|
|
198
|
+
img.style.maxWidth = 'none';
|
|
195
199
|
|
|
196
200
|
img.onclick = function() {
|
|
197
201
|
removeDebugImage(nodeId);
|
|
@@ -199,6 +203,9 @@
|
|
|
199
203
|
|
|
200
204
|
debugContainer.appendChild(img);
|
|
201
205
|
nodeElement.appendChild(debugContainer);
|
|
206
|
+
} else {
|
|
207
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
208
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
202
209
|
}
|
|
203
210
|
|
|
204
211
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -228,6 +228,10 @@
|
|
|
228
228
|
|
|
229
229
|
const nodeElement = document.getElementById(nodeId);
|
|
230
230
|
if (!nodeElement) return;
|
|
231
|
+
|
|
232
|
+
// Size to the server-resized debug image (no display cap)
|
|
233
|
+
var debugWidth = data.debugWidth || 200;
|
|
234
|
+
var debugHeight = data.debugHeight || 200;
|
|
231
235
|
|
|
232
236
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
233
237
|
|
|
@@ -237,8 +241,8 @@
|
|
|
237
241
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
238
242
|
debugContainer.setAttribute('x', '70');
|
|
239
243
|
debugContainer.setAttribute('y', '5');
|
|
240
|
-
debugContainer.setAttribute('width',
|
|
241
|
-
debugContainer.setAttribute('height',
|
|
244
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
245
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
242
246
|
debugContainer.style.overflow = 'visible';
|
|
243
247
|
|
|
244
248
|
// Create simple image directly inside foreignObject
|
|
@@ -248,8 +252,8 @@
|
|
|
248
252
|
img.style.height = 'auto';
|
|
249
253
|
img.style.display = 'block';
|
|
250
254
|
img.style.cursor = 'pointer';
|
|
251
|
-
img.style.maxHeight = '
|
|
252
|
-
img.style.maxWidth = '
|
|
255
|
+
img.style.maxHeight = 'none';
|
|
256
|
+
img.style.maxWidth = 'none';
|
|
253
257
|
|
|
254
258
|
img.onclick = function() {
|
|
255
259
|
removeDebugImage(nodeId);
|
|
@@ -257,6 +261,9 @@
|
|
|
257
261
|
|
|
258
262
|
debugContainer.appendChild(img);
|
|
259
263
|
nodeElement.appendChild(debugContainer);
|
|
264
|
+
} else {
|
|
265
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
266
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
260
267
|
}
|
|
261
268
|
|
|
262
269
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -156,6 +156,10 @@
|
|
|
156
156
|
|
|
157
157
|
const nodeElement = document.getElementById(nodeId);
|
|
158
158
|
if (!nodeElement) return;
|
|
159
|
+
|
|
160
|
+
// Size to the server-resized debug image (no display cap)
|
|
161
|
+
var debugWidth = data.debugWidth || 200;
|
|
162
|
+
var debugHeight = data.debugHeight || 200;
|
|
159
163
|
|
|
160
164
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
161
165
|
|
|
@@ -165,8 +169,8 @@
|
|
|
165
169
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
166
170
|
debugContainer.setAttribute('x', '70');
|
|
167
171
|
debugContainer.setAttribute('y', '5');
|
|
168
|
-
debugContainer.setAttribute('width',
|
|
169
|
-
debugContainer.setAttribute('height',
|
|
172
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
173
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
170
174
|
debugContainer.style.overflow = 'visible';
|
|
171
175
|
|
|
172
176
|
// Create simple image directly inside foreignObject
|
|
@@ -176,8 +180,8 @@
|
|
|
176
180
|
img.style.height = 'auto';
|
|
177
181
|
img.style.display = 'block';
|
|
178
182
|
img.style.cursor = 'pointer';
|
|
179
|
-
img.style.maxHeight = '
|
|
180
|
-
img.style.maxWidth = '
|
|
183
|
+
img.style.maxHeight = 'none';
|
|
184
|
+
img.style.maxWidth = 'none';
|
|
181
185
|
|
|
182
186
|
img.onclick = function() {
|
|
183
187
|
removeDebugImage(nodeId);
|
|
@@ -185,6 +189,9 @@
|
|
|
185
189
|
|
|
186
190
|
debugContainer.appendChild(img);
|
|
187
191
|
nodeElement.appendChild(debugContainer);
|
|
192
|
+
} else {
|
|
193
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
194
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
188
195
|
}
|
|
189
196
|
|
|
190
197
|
const img = document.getElementById('debug-img-' + nodeId);
|
|
@@ -220,9 +220,9 @@
|
|
|
220
220
|
const debugWidth = data.debugWidth || 200;
|
|
221
221
|
const debugHeight = data.debugHeight || 200;
|
|
222
222
|
|
|
223
|
-
//
|
|
224
|
-
const maxDisplayWidth =
|
|
225
|
-
const displayHeight = debugHeight
|
|
223
|
+
// Display at the server-resized debug dimensions (no display cap)
|
|
224
|
+
const maxDisplayWidth = debugWidth;
|
|
225
|
+
const displayHeight = debugHeight;
|
|
226
226
|
|
|
227
227
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
228
228
|
|
|
@@ -136,6 +136,10 @@
|
|
|
136
136
|
|
|
137
137
|
const nodeElement = document.getElementById(nodeId);
|
|
138
138
|
if (!nodeElement) return;
|
|
139
|
+
|
|
140
|
+
// Size to the server-resized debug image (no display cap)
|
|
141
|
+
var debugWidth = data.debugWidth || 200;
|
|
142
|
+
var debugHeight = data.debugHeight || 200;
|
|
139
143
|
|
|
140
144
|
let debugContainer = document.getElementById('debug-img-container-' + nodeId);
|
|
141
145
|
|
|
@@ -145,8 +149,8 @@
|
|
|
145
149
|
debugContainer.id = 'debug-img-container-' + nodeId;
|
|
146
150
|
debugContainer.setAttribute('x', '70');
|
|
147
151
|
debugContainer.setAttribute('y', '5');
|
|
148
|
-
debugContainer.setAttribute('width',
|
|
149
|
-
debugContainer.setAttribute('height',
|
|
152
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
153
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
150
154
|
debugContainer.style.overflow = 'visible';
|
|
151
155
|
|
|
152
156
|
// Create simple image directly inside foreignObject
|
|
@@ -156,8 +160,8 @@
|
|
|
156
160
|
img.style.height = 'auto';
|
|
157
161
|
img.style.display = 'block';
|
|
158
162
|
img.style.cursor = 'pointer';
|
|
159
|
-
img.style.maxHeight = '
|
|
160
|
-
img.style.maxWidth = '
|
|
163
|
+
img.style.maxHeight = 'none';
|
|
164
|
+
img.style.maxWidth = 'none';
|
|
161
165
|
|
|
162
166
|
img.onclick = function() {
|
|
163
167
|
removeDebugImage(nodeId);
|
|
@@ -165,6 +169,9 @@
|
|
|
165
169
|
|
|
166
170
|
debugContainer.appendChild(img);
|
|
167
171
|
nodeElement.appendChild(debugContainer);
|
|
172
|
+
} else {
|
|
173
|
+
debugContainer.setAttribute('width', debugWidth.toString());
|
|
174
|
+
debugContainer.setAttribute('height', debugHeight.toString());
|
|
168
175
|
}
|
|
169
176
|
|
|
170
177
|
const img = document.getElementById('debug-img-' + nodeId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosepetal/node-red-contrib-image-tools",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Node-RED Image Processing Toolkit",
|
|
5
5
|
"main": "install.sh",
|
|
6
6
|
"directories": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"sharp": "^0.34.2"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@rosepetal/node-red-contrib-image-tools-linux-x64": "1.6.
|
|
40
|
-
"@rosepetal/node-red-contrib-image-tools-linux-arm64": "1.6.
|
|
41
|
-
"@rosepetal/node-red-contrib-image-tools-linuxmusl-x64": "1.6.
|
|
42
|
-
"@rosepetal/node-red-contrib-image-tools-darwin-x64": "1.6.
|
|
43
|
-
"@rosepetal/node-red-contrib-image-tools-darwin-arm64": "1.6.
|
|
39
|
+
"@rosepetal/node-red-contrib-image-tools-linux-x64": "1.6.4",
|
|
40
|
+
"@rosepetal/node-red-contrib-image-tools-linux-arm64": "1.6.4",
|
|
41
|
+
"@rosepetal/node-red-contrib-image-tools-linuxmusl-x64": "1.6.4",
|
|
42
|
+
"@rosepetal/node-red-contrib-image-tools-darwin-x64": "1.6.4",
|
|
43
|
+
"@rosepetal/node-red-contrib-image-tools-darwin-arm64": "1.6.4"
|
|
44
44
|
},
|
|
45
45
|
"node-red": {
|
|
46
46
|
"version": ">=1.0.0",
|