1
0
Fork 0

Passing locale to insertText hook

This commit is contained in:
Joost De Cock 2018-12-17 16:13:49 +01:00
parent b40408c03b
commit 80e3cf7bb9

View file

@ -38,7 +38,8 @@ Svg.prototype.runHooks = function(hookName, data = false) {
/** Runs insertText hooks */
Svg.prototype.insertText = function(text) {
if (this.hooks.insertText.length > 0) {
for (let hook of this.hooks.insertText) text = hook.method(text, hook.data);
for (let hook of this.hooks.insertText)
text = hook.method(this.pattern.settings.locale, text, hook.data);
}
return text;