@node-projects/web-component-designer 0.1.312 → 0.1.313
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.
|
@@ -30,14 +30,31 @@ export class PositionExtension extends AbstractExtension {
|
|
|
30
30
|
this._line2.style.strokeDasharray = '' + (4 / this.designerCanvas.scaleFactor);
|
|
31
31
|
this._line3.style.strokeDasharray = '' + (4 / this.designerCanvas.scaleFactor);
|
|
32
32
|
this._line4.style.strokeDasharray = '' + (4 / this.designerCanvas.scaleFactor);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
const cm = this.extendedItem.element.computedStyleMap();
|
|
34
|
+
if (!(cm.get('right') instanceof CSSUnitValue)) {
|
|
35
|
+
let x = Math.round(itemRect.x - itemParentRect.x);
|
|
36
|
+
this._textX = this._drawTextWithBackground('' + x, itemParentRect.x + x / 2, itemRect.y + itemRect.height / 2, 'white', 'svg-position-text', this._textX);
|
|
37
|
+
this._textX[2].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
38
|
+
this._textX[3].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
let x = Math.round(itemParentRect.x + itemParentRect.width - (itemRect.x + itemRect.width));
|
|
42
|
+
this._textX = this._drawTextWithBackground('' + x, itemParentRect.x + itemParentRect.width - x / 2, itemRect.y + itemRect.height / 2, 'white', 'svg-position-text', this._textX);
|
|
43
|
+
this._textX[2].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
44
|
+
this._textX[3].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
45
|
+
}
|
|
46
|
+
if (!(cm.get('bottom') instanceof CSSUnitValue)) {
|
|
47
|
+
let y = Math.round(itemRect.y - itemParentRect.y);
|
|
48
|
+
this._textY = this._drawTextWithBackground('' + y, itemRect.x + itemRect.width / 2, itemParentRect.y + y / 2, 'white', 'svg-position-text', this._textY);
|
|
49
|
+
this._textY[2].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
50
|
+
this._textY[3].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
let y = Math.round(itemParentRect.y + itemParentRect.height - (itemRect.y + itemRect.height));
|
|
54
|
+
this._textY = this._drawTextWithBackground('' + y, itemRect.x + itemRect.width / 2, itemParentRect.y + itemParentRect.height - y / 2, 'white', 'svg-position-text', this._textY);
|
|
55
|
+
this._textY[2].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
56
|
+
this._textY[3].style.fontSize = (12 / this.designerCanvas.scaleFactor) + 'px';
|
|
57
|
+
}
|
|
41
58
|
}
|
|
42
59
|
}
|
|
43
60
|
dispose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionExtension.js","sourceRoot":"","sources":["../../../../../src/elements/widgets/designerView/extensions/PositionExtension.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,MAAM,OAAO,iBAAkB,SAAQ,iBAAiB;IAC9C,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAwE;IAC9E,MAAM,CAAwE;IAEtF,YAAY,gBAAmC,EAAE,YAA6B,EAAE,YAAyB;QACvG,KAAK,CAAC,gBAAgB,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;IAEQ,MAAM;QACb,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,UAAU,GAAG,EAAE,CAAC;IACP,OAAO;QAEd,kLAAkL;QAElL,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,+BAA+B,CAAC,IAAI,CAAC,YAAY,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,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;YAC/E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;YAE/E,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"PositionExtension.js","sourceRoot":"","sources":["../../../../../src/elements/widgets/designerView/extensions/PositionExtension.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,MAAM,OAAO,iBAAkB,SAAQ,iBAAiB;IAC9C,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAiB;IACvB,MAAM,CAAwE;IAC9E,MAAM,CAAwE;IAEtF,YAAY,gBAAmC,EAAE,YAA6B,EAAE,YAAyB;QACvG,KAAK,CAAC,gBAAgB,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;IAEQ,MAAM;QACb,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,UAAU,GAAG,EAAE,CAAC;IACP,OAAO;QAEd,kLAAkL;QAElL,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,+BAA+B,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAChG,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,+BAA+B,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE7G,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,QAAQ,CA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C,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,cAAc,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACjL,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;gBAC9E,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YAChF,CAAC;QACH,CAAC;IACH,CAAC;IAEQ,OAAO;QACd,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;CACF"}
|
package/dist/index-min.js
CHANGED
|
@@ -283,7 +283,7 @@ var wd=Object.defineProperty;var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var Sd=(s,e)=>{f
|
|
|
283
283
|
<mask id="mask-stripe-margin">
|
|
284
284
|
<rect x="0" y="0" width="100%" height="100%" fill="url(#pattern-stripe-margin)" />
|
|
285
285
|
</mask>
|
|
286
|
-
`}});var Ur,xa=u(()=>{"use strict";J();Ur=class extends L{_line1;_line2;_line3;_line4;_textX;_textY;constructor(e,t,i){super(e,t,i)}extend(){this.refresh()}_oldValues=[];refresh(){let e=this.designerCanvas.getNormalizedElementCoordinates(this.extendedItem.element),t=this.designerCanvas.getNormalizedElementCoordinates(this.extendedItem.parent.element);if(this._valuesHaveChanges(this.designerCanvas.scaleFactor,e.x,e.y,t.x,t.y,e.height,e.width,t.height,t.width)){this._line1=this._drawLine(t.x,e.y+e.height/2,e.x,e.y+e.height/2,"svg-position",this._line1),this._line2=this._drawLine(t.x+t.width,e.y+e.height/2,e.x+e.width,e.y+e.height/2,"svg-position",this._line2),this._line3=this._drawLine(e.x+e.width/2,t.y,e.x+e.width/2,e.y,"svg-position",this._line3),this._line4=this._drawLine(e.x+e.width/2,t.y+t.height,e.x+e.width/2,e.y+e.height,"svg-position",this._line4),this._line1.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line2.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line3.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line4.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line1.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line2.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line3.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line4.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor;let i=Math.round(e.x
|
|
286
|
+
`}});var Ur,xa=u(()=>{"use strict";J();Ur=class extends L{_line1;_line2;_line3;_line4;_textX;_textY;constructor(e,t,i){super(e,t,i)}extend(){this.refresh()}_oldValues=[];refresh(){let e=this.designerCanvas.getNormalizedElementCoordinates(this.extendedItem.element),t=this.designerCanvas.getNormalizedElementCoordinates(this.extendedItem.parent.element);if(this._valuesHaveChanges(this.designerCanvas.scaleFactor,e.x,e.y,t.x,t.y,e.height,e.width,t.height,t.width)){this._line1=this._drawLine(t.x,e.y+e.height/2,e.x,e.y+e.height/2,"svg-position",this._line1),this._line2=this._drawLine(t.x+t.width,e.y+e.height/2,e.x+e.width,e.y+e.height/2,"svg-position",this._line2),this._line3=this._drawLine(e.x+e.width/2,t.y,e.x+e.width/2,e.y,"svg-position",this._line3),this._line4=this._drawLine(e.x+e.width/2,t.y+t.height,e.x+e.width/2,e.y+e.height,"svg-position",this._line4),this._line1.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line2.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line3.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line4.style.strokeWidth=""+1/this.designerCanvas.scaleFactor,this._line1.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line2.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line3.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor,this._line4.style.strokeDasharray=""+4/this.designerCanvas.scaleFactor;let i=this.extendedItem.element.computedStyleMap();if(i.get("right")instanceof CSSUnitValue){let r=Math.round(t.x+t.width-(e.x+e.width));this._textX=this._drawTextWithBackground(""+r,t.x+t.width-r/2,e.y+e.height/2,"white","svg-position-text",this._textX),this._textX[2].style.fontSize=12/this.designerCanvas.scaleFactor+"px",this._textX[3].style.fontSize=12/this.designerCanvas.scaleFactor+"px"}else{let r=Math.round(e.x-t.x);this._textX=this._drawTextWithBackground(""+r,t.x+r/2,e.y+e.height/2,"white","svg-position-text",this._textX),this._textX[2].style.fontSize=12/this.designerCanvas.scaleFactor+"px",this._textX[3].style.fontSize=12/this.designerCanvas.scaleFactor+"px"}if(i.get("bottom")instanceof CSSUnitValue){let r=Math.round(t.y+t.height-(e.y+e.height));this._textY=this._drawTextWithBackground(""+r,e.x+e.width/2,t.y+t.height-r/2,"white","svg-position-text",this._textY),this._textY[2].style.fontSize=12/this.designerCanvas.scaleFactor+"px",this._textY[3].style.fontSize=12/this.designerCanvas.scaleFactor+"px"}else{let r=Math.round(e.y-t.y);this._textY=this._drawTextWithBackground(""+r,e.x+e.width/2,t.y+r/2,"white","svg-position-text",this._textY),this._textY[2].style.fontSize=12/this.designerCanvas.scaleFactor+"px",this._textY[3].style.fontSize=12/this.designerCanvas.scaleFactor+"px"}}}dispose(){this._removeAllOverlays()}}});import{css as ap}from"@node-projects/base-custom-webcomponent";var Kr,_a=u(()=>{"use strict";xa();Kr=class{shouldExtend(e,t,i){if(!i?.parent||i.element instanceof HTMLTemplateElement)return!1;let r=getComputedStyle(i.element);return r.position==="relative"||r.position==="absolute"}getExtension(e,t,i){return new Ur(e,t,i)}static style=ap`
|
|
287
287
|
.svg-position-text { text-anchor: middle; alignment-baseline: central; }
|
|
288
288
|
`}});var Yr,ba=u(()=>{"use strict";J();Z();Yr=class extends L{_rect;constructor(e,t,i){super(e,t,i)}extend(){this.refresh()}refresh(){let e=this.extendedItem.element.getBoxQuads({relativeTo:this.designerCanvas.canvas})[0];isNaN(e.p1.x)||(this._rect=this._drawTransformedRect(e,"svg-hover",this._rect,I.Background),this._rect.style.strokeWidth=(3/this.designerCanvas.scaleFactor).toString())}dispose(){this._removeAllOverlays()}}});import{css as lp}from"@node-projects/base-custom-webcomponent";var Xr,wa=u(()=>{"use strict";ba();Xr=class{shouldExtend(e,t,i){return!(i.element instanceof HTMLTemplateElement)}getExtension(e,t,i){return new Yr(e,t,i)}static style=lp`
|
|
289
289
|
.svg-hover { stroke: #90caf966; fill: none; }
|
package/package.json
CHANGED