mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-13 02:37:57 +01:00
Remove VML legacy code.
This commit is contained in:
parent
987a271e93
commit
650d70e05f
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user