Merge pull request #142 from iuyiuy/null_stroke_fix

Fixed an issue where resizing an element would set stroke="null" on it.
master
Jeff Schiller 2016-11-11 10:09:06 -08:00 committed by GitHub
commit 627d038e33
1 changed files with 2 additions and 2 deletions

View File

@ -1308,8 +1308,8 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
var delayedStroke = function(ele) { var delayedStroke = function(ele) {
var _stroke = ele.getAttributeNS(null, 'stroke'); var _stroke = ele.getAttributeNS(null, 'stroke');
ele.removeAttributeNS(null, 'stroke'); ele.removeAttributeNS(null, 'stroke');
//Re-apply stroke after delay. Anything higher than 1 seems to cause flicker // Re-apply stroke after delay. Anything higher than 1 seems to cause flicker
setTimeout(function() { ele.setAttributeNS(null, 'stroke', _stroke); }, 0); if (_stroke !== null) setTimeout(function() { ele.setAttributeNS(null, 'stroke', _stroke); }, 0);
}; };
} }
mouse_target.style.vectorEffect = 'non-scaling-stroke'; mouse_target.style.vectorEffect = 'non-scaling-stroke';