@node-projects/web-component-designer 0.1.136 → 0.1.138
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/assets/icons/jump.svg +1 -0
- package/dist/elements/controls/DesignerTabControl.js +1 -1
- package/dist/elements/services/demoProviderService/SimpleDemoProviderService.js +5 -6
- package/dist/elements/widgets/designerView/designerCanvas.js +0 -4
- package/dist/elements/widgets/designerView/extensions/contextMenu/JumpToElementContextMenu.js +1 -1
- package/dist/elements/widgets/designerView/tools/PointerTool.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M440-440v-160h80v80h80v80H440Zm280 0v-80h80v-80h80v160H720ZM440-720v-160h160v80h-80v80h-80Zm360 0v-80h-80v-80h160v160h-80ZM136-80l-56-56 224-224H120v-80h320v320h-80v-184L136-80Z"/></svg>
|
|
@@ -40,7 +40,7 @@ export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
|
|
|
40
40
|
display: flex;
|
|
41
41
|
justify-content: center;
|
|
42
42
|
align-items: center;
|
|
43
|
-
font-family:
|
|
43
|
+
font-family: math;
|
|
44
44
|
}
|
|
45
45
|
.header-more:hover {
|
|
46
46
|
background: var(--light-grey, #383f52);
|
|
@@ -22,12 +22,11 @@ export class SimpleDemoProviderService {
|
|
|
22
22
|
}
|
|
23
23
|
shadowRoot.adoptedStyleSheets = styles;
|
|
24
24
|
shadowRoot.innerHTML = '';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
shadowRoot.appendChild(fragment);
|
|
25
|
+
if ('setHTMLUnsafe' in shadowRoot)
|
|
26
|
+
//@ts-ignore
|
|
27
|
+
shadowRoot.setHTMLUnsafe(code);
|
|
28
|
+
else
|
|
29
|
+
shadowRoot.innerHTML = code;
|
|
31
30
|
contentDiv.style.display = '';
|
|
32
31
|
}
|
|
33
32
|
}
|
|
@@ -667,10 +667,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
667
667
|
this.extensionManager.disconnected();
|
|
668
668
|
}
|
|
669
669
|
_zoomFactorChanged() {
|
|
670
|
-
//a@ts-ignore
|
|
671
|
-
//this._canvasContainer.style.zoom = <any>this._zoomFactor;
|
|
672
|
-
//this._canvasContainer.style.transform = 'scale(' + this._zoomFactor+') translate(' + this._translate.x + ', '+this._translate.y+')';
|
|
673
|
-
//this._canvasContainer.style.transformOrigin = '0 0';
|
|
674
670
|
this._canvasContainer.style.bottom = this._outercanvas2.offsetHeight >= this._canvasContainer.offsetHeight ? '0' : '';
|
|
675
671
|
this._canvasContainer.style.right = this._outercanvas2.offsetWidth >= this._canvasContainer.offsetWidth ? '0' : '';
|
|
676
672
|
this._updateTransform();
|
package/dist/elements/widgets/designerView/extensions/contextMenu/JumpToElementContextMenu.js
CHANGED
|
@@ -5,7 +5,7 @@ export class JumpToElementContextMenu {
|
|
|
5
5
|
provideContextMenuItems(event, designerCanvas, designItem) {
|
|
6
6
|
return [
|
|
7
7
|
{
|
|
8
|
-
title: 'jump to', action: () => {
|
|
8
|
+
title: 'jump to', icon: `<img src="${new URL('../../../../../../assets/icons/jump.svg', import.meta.url)}">`, action: () => {
|
|
9
9
|
const coord = designerCanvas.getNormalizedElementCoordinates(designItem.element);
|
|
10
10
|
designerCanvas.zoomPoint({ x: coord.x + coord.width / 2, y: coord.y + coord.height / 2 }, designerCanvas.zoomFactor);
|
|
11
11
|
}
|
|
@@ -212,8 +212,10 @@ export class PointerTool {
|
|
|
212
212
|
}
|
|
213
213
|
if (!this._actionStartedDesignItem)
|
|
214
214
|
return;
|
|
215
|
-
if (!this._changeGroup)
|
|
215
|
+
if (!this._changeGroup) {
|
|
216
216
|
this._changeGroup = designerCanvas.rootDesignItem.openGroup("Move Elements");
|
|
217
|
+
window.addEventListener('pointerup', () => { this._changeGroup?.abort(); this._changeGroup = null; }, { once: true });
|
|
218
|
+
}
|
|
217
219
|
if (event.ctrlKey && !this._copiedItemsInserted) {
|
|
218
220
|
this._changeGroup.title = "Copy Elements";
|
|
219
221
|
this._copiedItemsInserted = true;
|
|
@@ -332,6 +334,7 @@ export class PointerTool {
|
|
|
332
334
|
try {
|
|
333
335
|
containerService.finishPlace(event, designerCanvas, this._actionStartedDesignItem.parent, this._initialPoint, this._initialOffset, cp, designerCanvas.instanceServiceContainer.selectionService.selectedElements);
|
|
334
336
|
this._changeGroup.commit();
|
|
337
|
+
this._changeGroup = null;
|
|
335
338
|
}
|
|
336
339
|
catch (err) {
|
|
337
340
|
console.error(err);
|
package/package.json
CHANGED