mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Define Path#toShape() and Shape#toPath() as aliases to #clone().
This commit is contained in:
parent
8639051081
commit
e8390a76d8
3 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
* http://paperjs.org/
|
* http://paperjs.org/
|
||||||
|
|
|
@ -186,6 +186,8 @@ var Shape = Item.extend(/** @lends Shape# */{
|
||||||
return path;
|
return path;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toShape: '#clone',
|
||||||
|
|
||||||
_draw: function(ctx, param, strokeMatrix) {
|
_draw: function(ctx, param, strokeMatrix) {
|
||||||
var style = this._style,
|
var style = this._style,
|
||||||
hasFill = style.hasFill(),
|
hasFill = style.hasFill(),
|
||||||
|
|
|
@ -1522,6 +1522,8 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toPath: '#clone',
|
||||||
|
|
||||||
_hitTestSelf: function(point, options) {
|
_hitTestSelf: function(point, options) {
|
||||||
var that = this,
|
var that = this,
|
||||||
style = this.getStyle(),
|
style = this.getStyle(),
|
||||||
|
|
Loading…
Reference in a new issue