1
0
Fork 0

feat(core): Added the path.noop() method to core

This commit is contained in:
Joost De Cock 2020-01-12 17:57:05 +01:00
parent e9b003920c
commit d906d68613

View file

@ -71,6 +71,13 @@ Path.prototype.close = function() {
return this
}
/** Adds a noop operation */
Path.prototype.noop = function(id = false) {
this.ops.push({ type: 'noop', id })
return this
}
/** Adds an attribute. This is here to make this call chainable in assignment */
Path.prototype.attr = function(name, value, overwrite = false) {
if (overwrite) this.attributes.set(name, value)