vector-effects: non-scalable-stroke, applied to stroke of bbox

This commit is contained in:
clemniem 2016-06-08 16:46:20 +02:00
parent 7dd03d08e5
commit f0aad8846c

View file

@ -82,7 +82,7 @@ Snap.plugin(function (Snap, Element, Paper, global) {
handleLength: 18, handleLength: 18,
handleRadius: 16, handleRadius: 16,
unscale: 1, unscale: 1,
handleStrokeDash: "5,5", handleStrokeDash: "5,5"
}; };
Element.prototype.ftToggleHandles = function(){ Element.prototype.ftToggleHandles = function(){
@ -215,8 +215,9 @@ Snap.plugin(function (Snap, Element, Paper, global) {
// transformed bbox // transformed bbox
this.data("bbT", this.paper.rect( rectObjFromBB( this.getBBox(1) ) ) this.data("bbT", this.paper.rect( rectObjFromBB( this.getBBox(1) ) )
.attr({ fill: "none", stroke: ftOption.handleFill, strokeWidth: ftOption.handleStrokeWidth, strokeDasharray: ftOption.handleStrokeDashPreset.join(',') }) .attr({ fill: "none", 'vector-effect': "non-scaling-stroke", stroke: ftOption.handleFill, strokeWidth: ftOption.handleStrokeWidth, strokeDasharray: ftOption.handleStrokeDashPreset.join(',') })
.transform( this.transform().global.toString() ) ); .transform( this.transform().global.toString() ) );
// outer bbox // outer bbox
this.data("bb", this.paper.select('#userContent').rect( rectObjFromBB( this.getBBox() ) ) this.data("bb", this.paper.select('#userContent').rect( rectObjFromBB( this.getBBox() ) )
.attr({ fill: "none", stroke: 'gray', strokeWidth: ftOption.handleStrokeWidth, strokeDasharray: ftOption.handleStrokeDash }) ); .attr({ fill: "none", stroke: 'gray', strokeWidth: ftOption.handleStrokeWidth, strokeDasharray: ftOption.handleStrokeDash }) );
@ -338,7 +339,7 @@ Snap.plugin(function (Snap, Element, Paper, global) {
} }
mainEl.data("angle", angle ); mainEl.data("angle", angle );
} }
mainEl.ftUpdateTransform(); mainEl.ftUpdateTransform();
mainEl.ftDrawJoinLine( handle ); mainEl.ftDrawJoinLine( handle );
}; };