fix
This commit is contained in:
@@ -127,7 +127,6 @@ fabric.Point.prototype.normalize = function(thickness) {
|
||||
* This makes the drawing editable, it can be moved, rotated, scaled, skewed etc.
|
||||
*/
|
||||
fabric.BaseBrush.prototype.convertToPath = function() {
|
||||
console.log(this.canvas.upperCanvasEl);
|
||||
var pixelRatio = this.canvas.getRetinaScaling(),
|
||||
c = fabric.util.copyCanvasElement(this.canvas.upperCanvasEl),
|
||||
xy = fabric.util.trimCanvas(c),
|
||||
@@ -147,13 +146,16 @@ fabric.BaseBrush.prototype.convertToPath = function() {
|
||||
strokeWidth: this._width,
|
||||
stroke: 'black',
|
||||
fill:'transparent',
|
||||
custom:{
|
||||
dashed:true
|
||||
},
|
||||
}).setCoords();
|
||||
let group = new fabric.Group([pathElemetn],{
|
||||
left:((xy.x)/pixelRatio-pointerX)/this.canvas.getZoom(),
|
||||
top:((xy.y)/pixelRatio-pointerY)/this.canvas.getZoom(),
|
||||
custom:{
|
||||
dashed:true
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
this.canvas.add(group).clearContext(this.canvas.contextTop);
|
||||
|
||||
Reference in New Issue
Block a user