From 650d70e05fa93b56b28c6bbc93f2d8ab62f687c9 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 18 Feb 2022 15:52:57 -0800 Subject: [PATCH] Remove VML legacy code. --- .../mindplot/src/components/ConnectionLine.ts | 2 +- .../src/components/peer/svg/ElementPeer.js | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/mindplot/src/components/ConnectionLine.ts b/packages/mindplot/src/components/ConnectionLine.ts index 0405f123..d54817f5 100644 --- a/packages/mindplot/src/components/ConnectionLine.ts +++ b/packages/mindplot/src/components/ConnectionLine.ts @@ -154,7 +154,7 @@ class ConnectionLine { } } - setStroke(color: string, style, opacity: number) { + setStroke(color: string, style: string, opacity: number) { this._line2d.setStroke(null, null, color, opacity); } diff --git a/packages/web2d/src/components/peer/svg/ElementPeer.js b/packages/web2d/src/components/peer/svg/ElementPeer.js index ffdcfbfe..7b89187f 100644 --- a/packages/web2d/src/components/peer/svg/ElementPeer.js +++ b/packages/web2d/src/components/peer/svg/ElementPeer.js @@ -174,23 +174,6 @@ class ElementPeer { this._native.setAttribute('stroke', color); } if ($defined(style)) { - // Scale the dash array in order to be equal to VML. In VML, stroke style doesn't scale. - const dashArrayPoints = ElementPeer.stokeStyleToStrokDasharray()[style]; - const scale = 1 / TransformUtil.workoutScale(this).width; - - let strokeWidth = this._native.getAttribute('stroke-width'); - strokeWidth = parseFloat(strokeWidth); - - const scaledPoints = []; - for (let i = 0; i < dashArrayPoints.length; i++) { - // VML scale the stroke based on the stroke width. - scaledPoints[i] = dashArrayPoints[i] * strokeWidth; - - // Scale the points based on the scale. - scaledPoints[i] = `${scaledPoints[i] * scale}px`; - } - - // this._native.setAttribute('stroke-dasharray', scaledPoints); this._stokeStyle = style; }