You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a/lib/spritesheet-templates.js
+++ b/lib/spritesheet-templates.js
@@ -4,6 +4,7 @@ var fs = require('fs');
var _ = require('underscore');
var mustache = require('mustache');
var jsonContentDemux = require('json-content-demux');
+var unit = 'px';
/**
@param {Object} params Container for parameters
@@ -34,6 +35,9 @@ function templater(params, options) {
options = options || {};
var format = options.format || 'css';
var template = templater.templates[format];
if(options.unit === 'rem'){
unit = 'rem';
}
// Assert that the template exists
assert(template, 'The templater format "' + format + '" could not be found. P
@@ -100,7 +104,7 @@ templater.ensureOffsetAndPx = function (item) {
// For each of the x, y, offset_x, offset_y, height, width, add a px after th
['x', 'y', 'offset_x', 'offset_y', 'height', 'width', 'total_height', 'total_
if (item[key] !== undefined) {
px[key] = item[key] + 'px';
px[key] = item[key] + unit;
}
});
};
The text was updated successfully, but these errors were encountered:
can you update to support?
--- a/lib/spritesheet-templates.js
+++ b/lib/spritesheet-templates.js
@@ -4,6 +4,7 @@ var fs = require('fs');
var _ = require('underscore');
var mustache = require('mustache');
var jsonContentDemux = require('json-content-demux');
+var unit = 'px';
/**
@param {Object} params Container for parameters
@@ -34,6 +35,9 @@ function templater(params, options) {
options = options || {};
var format = options.format || 'css';
var template = templater.templates[format];
// Assert that the template exists
assert(template, 'The templater format "' + format + '" could not be found. P
@@ -100,7 +104,7 @@ templater.ensureOffsetAndPx = function (item) {
// For each of the x, y, offset_x, offset_y, height, width, add a px after th
['x', 'y', 'offset_x', 'offset_y', 'height', 'width', 'total_height', 'total_
if (item[key] !== undefined) {
});
};
The text was updated successfully, but these errors were encountered: