From bc04986d045da82b7e3b13c7677f20d662f9d85b Mon Sep 17 00:00:00 2001 From: yrift Date: Fri, 27 Apr 2018 23:06:32 +0300 Subject: [PATCH] photoshop cc fixed photoshop cc was not working but repair it var ru = app.preferences.rulerUnits; // set ruler units to pixel to ensure scaling works as expected app.preferences.rulerUnits = Units.PIXELS; --- us-export-to-ios.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/us-export-to-ios.jsx b/us-export-to-ios.jsx index 5718de2..643f322 100644 --- a/us-export-to-ios.jsx +++ b/us-export-to-ios.jsx @@ -28,6 +28,13 @@ init(); // The other functions function init() { + // fix photoshop cc + // save current ruler unit settings, so we can restore it + var ru = app.preferences.rulerUnits; + + // set ruler units to pixel to ensure scaling works as expected + app.preferences.rulerUnits = Units.PIXELS; + if(!isDocumentNew()) { for(var dpi in scaleFactors) { saveFunc(dpi); @@ -147,4 +154,4 @@ function saveFunc(dpi) { // Close the document without saving activeDocument.close(SaveOptions.DONOTSAVECHANGES); -} \ No newline at end of file +}