Skip to content

Commit

Permalink
Workaround for Firefox leading zeroes duration issue (https://bugzill…
Browse files Browse the repository at this point in the history
…a.mozilla.org/show_bug.cgi?id=1317652)

Added more helpful information to non-AS3 document error
  • Loading branch information
TomByrne committed Nov 15, 2016
1 parent ad26f6e commit 8c5a8e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.48.0
3.49.0
17 changes: 11 additions & 6 deletions html/ExtensionContent/Extensible/SVG.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@
drawStrokesOverFills:true,
revert:false
});


this.isFlashDoc = (ext.doc.type == "Flash" || ext.doc.type == null);
if(!this.isFlashDoc){
alert("Exporting from Non-AS3 documents is not supported.\n\nPlease do the following:\n- Select and copy all layers\n- Create new Actionscript 3 document\n- Paste all layers into new document\n- Save new document\n- Retry export\n\nCurrent doument type is "+ext.doc.type+".");
return;
}

if(options instanceof XML || typeof(options)=='string'){
ext.Task.apply(this,[settings]);
this.loadSettings(options);
Expand Down Expand Up @@ -204,12 +212,6 @@
this.animated = true;
}
if(this.animated)this.applyTransformations = false;

this.isFlashDoc = (ext.doc.type == "Flash" || ext.doc.type == null);
if(!this.isFlashDoc){
alert("Exporting from Non-Flash documents is not supported.\n\nPlease copy and paste all layers into a Flash document before exporting.");
return;
}

if(typeof(this.curveDegree)=='string'){
var num = parseInt(this.curveDegree);
Expand Down Expand Up @@ -1104,6 +1106,9 @@
}
outputObj.string = this.removeLeadingZeros(outputObj.string);

// Temporary fix for Firefox issue
outputObj.string = outputObj.string.split('dur=".').join('dur="0.');

if(ext.log){
ext.log.pauseTimer(timer);
}
Expand Down

0 comments on commit 8c5a8e4

Please sign in to comment.