feat(core): Added new utility methods for attrs
This commit is contained in:
parent
21434ed2f6
commit
50b37f4cb5
3 changed files with 39 additions and 0 deletions
|
@ -35,6 +35,13 @@ Path.prototype.setRender = function (render = true) {
|
|||
return this
|
||||
}
|
||||
|
||||
/** Chainable way to set the class property */
|
||||
Path.prototype.setClass = function (className = false) {
|
||||
if (className) this.attributes.set('class', className)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
/** Adds a move operation to Point to */
|
||||
Path.prototype.move = function (to) {
|
||||
if (to instanceof Point !== true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue