1
0
Fork 0

Better support for insertText() hook

This commit is contained in:
Joost De Cock 2018-08-28 08:53:32 +02:00
parent 7d9df9f361
commit 91ae2946e4
2 changed files with 17 additions and 2 deletions

View file

@ -32,6 +32,12 @@ Attributes.prototype.get = function(name) {
else return this.list[name].join(" ");
};
/** Retrieves an attribute as array*/
Attributes.prototype.getAsArray = function(name) {
if (typeof this.list[name] === "undefined") return false;
else return this.list[name];
};
/** Returns SVG code for attributes */
Attributes.prototype.render = function() {
let svg = "";