1
0
Fork 0

feat(core): Added new utility methods for attrs

This commit is contained in:
joostdecock 2022-07-23 14:52:56 +02:00
parent 21434ed2f6
commit 50b37f4cb5
3 changed files with 39 additions and 0 deletions

View file

@ -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)