✨ Further changes to handling of parts and copying their data
This commit is contained in:
parent
415a98f68e
commit
fd80450d77
6 changed files with 30 additions and 44 deletions
|
@ -40,8 +40,9 @@ path.prototype.close = function() {
|
|||
};
|
||||
|
||||
/** Adds an attribute. This is here to make this call chainable in assignment */
|
||||
path.prototype.attr = function(name, value) {
|
||||
this.attributes.add(name, value);
|
||||
path.prototype.attr = function(name, value, overwrite = false) {
|
||||
if (overwrite) this.attributes.set(name, value);
|
||||
else this.attributes.add(name, value);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue