Skip to content

Commit

Permalink
Removed the scale prompt, to use the LocalToGlobal scale instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Karl committed Oct 30, 2015
1 parent 0cc31fa commit d28649b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.3.1",
"private": true,
"devDependencies": {
"grunt": "^0.4.5",
Expand Down
32 changes: 1 addition & 31 deletions src/Commands/Utilities/Copy Layers To Bitmap.jsfl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
(function()
{
var DATA_KEY = 'copyLayersToBitmapScale';
var SCALE_PROMPT = 'Output scale';

var dom = fl.getDocumentDOM();

if (!dom) return;
Expand Down Expand Up @@ -46,8 +43,7 @@
}

var bitmapName;
var scale;
var defaultScale;
var scale = localToGlobalScale();

// If we're inside a symbol, use the name of the
if (timeline.libraryItem)
Expand All @@ -59,31 +55,11 @@
{
bitmapName = bitmapName.substr(index + 1);
}

// Get and save scale for library item
defaultScale = item.hasData(DATA_KEY) ? item.getData(DATA_KEY) : localToGlobalScale();
scale = prompt(SCALE_PROMPT, defaultScale);
if (!scale)
{
return;
}
scale = parseFloat(scale);
item.addData(DATA_KEY, "double", scale);
}
else if (dom.name)
{
// Chop of the ".fla" or ".xfl" extension
bitmapName = dom.name.substr(0, dom.name.lastIndexOf('.'));

// Get and save scale for document
defaultScale = dom.documentHasData(DATA_KEY) ? dom.getDataFromDocument(DATA_KEY) : localToGlobalScale();
scale = prompt(SCALE_PROMPT, defaultScale);
if (!scale)
{
return;
}
scale = parseFloat(scale);
dom.addDataToDocument(DATA_KEY, "double", scale);
}

// Cancelled
Expand All @@ -92,12 +68,6 @@
return alert("Error: Invalid bitmap name");
}

// No scale, if the document isn't saved
if (!scale)
{
return alert("Error: Invalid scale amount");
}

// The number of layers
var origLength = timeline.layers.length;

Expand Down
2 changes: 1 addition & 1 deletion src/io.springroll.toolkit.mxi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name="SpringRoll Flash Toolkit"
id="io.springroll.toolkit"
requires-restart="true"
version="1.3.0">
version="1.3.1">
<author name="SpringRoll"/>
<description>
<![CDATA[Commands for Exporting, Optimizing and Publish HTML5 Canvas documents]]>
Expand Down

0 comments on commit d28649b

Please sign in to comment.