mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-26 06:03:44 +00:00
Merge pull request #1914 from TomKaltz/master
Allow the use of lineDashArray with the free drawing tool.
This commit is contained in:
commit
a0e13b36b7
2 changed files with 9 additions and 0 deletions
|
|
@ -42,6 +42,13 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
|
|||
*/
|
||||
strokeLineJoin: 'round',
|
||||
|
||||
/**
|
||||
* Stroke Dash Array.
|
||||
* @type Array
|
||||
* @default
|
||||
*/
|
||||
strokeDashArray: null,
|
||||
|
||||
/**
|
||||
* Sets shadow of an object
|
||||
* @param {Object|String} [options] Options object or string (e.g. "2px 2px 10px rgba(0,0,0,0.2)")
|
||||
|
|
@ -64,6 +71,7 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
|
|||
ctx.lineWidth = this.width;
|
||||
ctx.lineCap = this.strokeLineCap;
|
||||
ctx.lineJoin = this.strokeLineJoin;
|
||||
ctx.setLineDash(this.strokeDashArray);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@
|
|||
strokeWidth: this.width,
|
||||
strokeLineCap: this.strokeLineCap,
|
||||
strokeLineJoin: this.strokeLineJoin,
|
||||
strokeDashArray: this.strokeDashArray,
|
||||
originX: 'center',
|
||||
originY: 'center'
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue