Closed pen18 closed 8 years ago
The same happens to me. Trying Tincr
I used Tincr before Devtools Autosave. But Tincr didn't become working. I'm trying workspaces now.
Yes, I noticed the same. Learning to use workspaces now. Good luck!
I had the same issue. What I did is modify the options.js
file to "avoid" the error. I am happy to say that it's working as it should do it.
So, step one: download the project from github.
Then modify the options.js
file, go to the line 528 (Object.defineProperty(SVGGElement.prototype, 'x'.....
) and prepend this:
if( this.dataset === undefined ) this.dataset = {};
to the set() method.
Do the same with the next method (Object.defineProperty(SVGGElement.prototype, 'y'....
).
To finish follow the instructions at http://superuser.com/a/247654/327682.
I had just to declare the dataset object, that (I don't know why) is undefined.
Complete changed code:
Object.defineProperty(SVGGElement.prototype, 'x', {
get: function() {
if (typeof this.dataset.x === 'undefined') {
var matched = this.getAttribute('transform').match(/translate\(([\d.]+),[\d.]+\)/);
this.dataset.x = matched ? matched[1] : 0;
}
return parseInt(this.dataset.x);
},
set: function(x) {
if( this.dataset === undefined ) this.dataset = {};
this.dataset.x = x;
this.setAttribute('transform', 'translate(' + x + ',' + this.y + ')');
}
});
Object.defineProperty(SVGGElement.prototype, 'y', {
get: function() {
if (typeof this.dataset.y === 'undefined') {
var matched = this.getAttribute('transform').match(/translate\([\d.]+,([\d.]+)\)/);
this.dataset.y = matched ? matched[1] : 0;
}
return parseInt(this.dataset.y);
},
set: function(y) {
if( this.dataset === undefined ) this.dataset = {};
this.dataset.y = y;
this.setAttribute('transform', 'translate(' + this.x + ',' + y + ')');
}
});
Regards.
Fixed in 1.2.4. The extension should update automatically.
@kmsdevnet thank you for explaining what was broken.
I am glad to help. This is a great utility after all :smile:
The drag function stopped working after update Chrome 45.0.2454.85 ? Please help me or tell me alternative.