- Linting (ESLint): Apply new rules ("fixme"->"todo"; prefer regex literals; defaults at end)

- Optimization: Image size
- npm: Bump devDeps (Babel/eslint/rollup-related; imageoptim, testcafe)
This commit is contained in:
Brett Zamir
2019-09-20 12:40:31 +08:00
parent cdacae8be3
commit 404911827e
46 changed files with 1879 additions and 1547 deletions

View File

@@ -636,7 +636,7 @@ export class UndoManager {
* @returns {void}
*/
addCommandToHistory (cmd) {
// FIXME: we MUST compress consecutive text changes to the same element
// TODO: we MUST compress consecutive text changes to the same element
// (right now each keystroke is saved as a separate command that includes the
// entire text contents of the text element)
// TODO: consider limiting the history that we store here (need to do some slicing)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 389 B

View File

@@ -243,7 +243,7 @@ const svgElementToPdf = function (element, pdf, options) {
}
return box.width;
};
// FIXME: use more accurate positioning!!
// TODO: use more accurate positioning!!
let x, y, xOffset = 0;
if (node.hasAttribute('text-anchor')) {
switch (node.getAttribute('text-anchor')) {

View File

@@ -273,7 +273,7 @@ export const recalculateDimensions = function (selected) {
if (Math.abs(a) > (1.0e-10)) {
s = Math.sin(a) / (1 - Math.cos(a));
} else {
// FIXME: This blows up if the angle is exactly 0!
// TODO: This blows up if the angle is exactly 0!
s = 2 / a;
}
for (let i = 0; i < tlist.numberOfItems; ++i) {
@@ -599,7 +599,7 @@ export const recalculateDimensions = function (selected) {
}
// else, it's a non-group
} else {
// FIXME: box might be null for some elements (<metadata> etc), need to handle this
// TODO: box might be null for some elements (<metadata> etc), need to handle this
const box = getBBox(selected);
// Paths (and possbly other shapes) will have no BBox while still in <defs>,
@@ -623,7 +623,7 @@ export const recalculateDimensions = function (selected) {
const a = angle * Math.PI / 180;
const s = (Math.abs(a) > (1.0e-10))
? Math.sin(a) / (1 - Math.cos(a))
// FIXME: This blows up if the angle is exactly 0!
// TODO: This blows up if the angle is exactly 0!
: 2 / a;
for (let i = 0; i < tlist.numberOfItems; ++i) {

View File

@@ -233,7 +233,7 @@ export const sanitizeSvg = function (node) {
// else (element not supported), remove it
} else {
// remove all children from this node and insert them before this node
// FIXME: in the case of animation elements this will hardly ever be correct
// TODO: in the case of animation elements this will hardly ever be correct
const children = [];
while (node.hasChildNodes()) {
children.push(parent.insertBefore(node.firstChild, node));

View File

@@ -1626,7 +1626,7 @@ editor.init = function () {
// if there were too few rows, let's add a few to make it not so lonely
let num = 5 - $('#layerlist tr.layer').size();
while (num-- > 0) {
// FIXME: there must a better way to do this
// TODO: there must a better way to do this
layerlist.append('<tr><td style="color:white">_</td><td/></tr>');
}
};

View File

@@ -1955,7 +1955,7 @@ const mouseDown = function (evt) {
preventClickDefault(newImage);
break;
} case 'square':
// FIXME: once we create the rect, we lose information that this was a square
// TODO: once we create the rect, we lose information that this was a square
// (for resizing purposes this could be important)
// Fallthrough
case 'rect':
@@ -6169,7 +6169,7 @@ const changeSelectedAttributeNoUndo = function (attr, newValue, elems) {
}
// only allow the transform/opacity/filter attribute to change on <g> elements, slightly hacky
// TODO: FIXME: Missing statement body
// TODO: Missing statement body
// if (elem.tagName === 'g' && goodGAttrs.includes(attr)) {}
let oldval = attr === '#text' ? elem.textContent : elem.getAttribute(attr);
if (isNullish(oldval)) { oldval = ''; }

View File

@@ -361,10 +361,10 @@ export default function jQueryPluginSVGIcons ($) {
/**
*
* @param {boolean} [toImage]
* @param {external:jQuery.svgIcons.Fallback} [fallback]
* @param {external:jQuery.svgIcons.Fallback} [fallback=false]
* @returns {void}
*/
function makeIcons (toImage = false, fallback) {
function makeIcons (toImage = false, fallback = false) {
if (iconsMade) return;
if (opts.no_img) toImage = false;

View File

@@ -961,7 +961,7 @@ if (!('SVGPathSegList' in window) || !('appendItem' in window.SVGPathSegList.pro
},
enumerable: true
},
// FIXME: The following are not implemented and simply return SVGPathElement.pathSegList.
// TODO: The following are not implemented and simply return SVGPathElement.pathSegList.
normalizedPathSegList: {get () { return this.pathSegList; }, enumerable: true},
animatedPathSegList: {get () { return this.pathSegList; }, enumerable: true},
animatedNormalizedPathSegList: {get () { return this.pathSegList; }, enumerable: true}

View File

@@ -395,7 +395,7 @@ export const walkTree = function (elem, cbFn) {
/**
* Walks the tree and executes the callback on each element in a depth-first fashion.
* @function module:utilities.walkTreePost
* @todo FIXME: Shouldn't this be calling walkTreePost?
* @todo Shouldn't this be calling walkTreePost?
* @param {Element} elem - DOM element to traverse
* @param {module:utilities.TreeWalker} cbFn - Callback function to run on each element
* @returns {void}
@@ -1300,8 +1300,8 @@ export const snapToGrid = function (value) {
* @returns {string}
*/
export const regexEscape = function (str) {
// From: http://phpjs.org/functions
return String(str).replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]', 'g'), '\\$&');
// Originally from: http://phpjs.org/functions
return String(str).replace(/[.\\+*?[^\]$(){}=!<>|:-]/g, '\\$&');
};
/**

View File

@@ -231,6 +231,10 @@
}
function _iterableToArrayLimit(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = [];
var _n = true;
var _d = false;
@@ -266,7 +270,7 @@
function _wrapRegExp(re, groups) {
_wrapRegExp = function (re, groups) {
return new BabelRegExp(re, groups);
return new BabelRegExp(re, undefined, groups);
};
var _RegExp = _wrapNativeSuper(RegExp);
@@ -275,10 +279,10 @@
var _groups = new WeakMap();
function BabelRegExp(re, groups) {
var _this = _RegExp.call(this, re);
function BabelRegExp(re, flags, groups) {
var _this = _RegExp.call(this, re, flags);
_groups.set(_this, groups);
_groups.set(_this, groups || _groups.get(re));
return _this;
}
@@ -2739,7 +2743,7 @@
},
enumerable: true
},
// FIXME: The following are not implemented and simply return SVGPathElement.pathSegList.
// TODO: The following are not implemented and simply return SVGPathElement.pathSegList.
normalizedPathSegList: {
get: function get() {
return this.pathSegList;
@@ -4695,7 +4699,7 @@
}, {
key: "addCommandToHistory",
value: function addCommandToHistory(cmd) {
// FIXME: we MUST compress consecutive text changes to the same element
// TODO: we MUST compress consecutive text changes to the same element
// (right now each keystroke is saved as a separate command that includes the
// entire text contents of the text element)
// TODO: consider limiting the history that we store here (need to do some slicing)
@@ -8384,7 +8388,7 @@
/**
* Walks the tree and executes the callback on each element in a depth-first fashion.
* @function module:utilities.walkTreePost
* @todo FIXME: Shouldn't this be calling walkTreePost?
* @todo Shouldn't this be calling walkTreePost?
* @param {Element} elem - DOM element to traverse
* @param {module:utilities.TreeWalker} cbFn - Callback function to run on each element
* @returns {void}
@@ -9364,8 +9368,8 @@
*/
var regexEscape = function regexEscape(str) {
// From: http://phpjs.org/functions
return String(str).replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]', 'g'), '\\$&');
// Originally from: http://phpjs.org/functions
return String(str).replace(/[.\\+*?[^\]$(){}=!<>|:-]/g, '\\$&');
};
/**
* Prevents default browser click behaviour on the given element.
@@ -11827,7 +11831,7 @@
} else {
// remove all children from this node and insert them before this node
// FIXME: in the case of animation elements this will hardly ever be correct
// TODO: in the case of animation elements this will hardly ever be correct
var children = [];
while (node.hasChildNodes()) {
@@ -12507,7 +12511,7 @@
if (Math.abs(a) > 1.0e-10) {
s = Math.sin(a) / (1 - Math.cos(a));
} else {
// FIXME: This blows up if the angle is exactly 0!
// TODO: This blows up if the angle is exactly 0!
s = 2 / a;
}
@@ -12868,7 +12872,7 @@
} // else, it's a non-group
} else {
// FIXME: box might be null for some elements (<metadata> etc), need to handle this
// TODO: box might be null for some elements (<metadata> etc), need to handle this
var _box = getBBox(selected); // Paths (and possbly other shapes) will have no BBox while still in <defs>,
// but we still may need to recalculate them (see issue 595).
// TODO: Figure out how to get BBox from these elements in case they
@@ -12892,7 +12896,7 @@
var _a = _angle * Math.PI / 180;
var _s = Math.abs(_a) > 1.0e-10 ? Math.sin(_a) / (1 - Math.cos(_a)) // FIXME: This blows up if the angle is exactly 0!
var _s = Math.abs(_a) > 1.0e-10 ? Math.sin(_a) / (1 - Math.cos(_a)) // TODO: This blows up if the angle is exactly 0!
: 2 / _a;
for (var _i2 = 0; _i2 < tlist.numberOfItems; ++_i2) {
@@ -15611,19 +15615,38 @@
if (!rightClick) {
// insert a dummy transform so if the element(s) are moved it will have
// a transform to use for its translate
for (var _i2 = 0, _selectedElements = selectedElements; _i2 < _selectedElements.length; _i2++) {
var selectedElement = _selectedElements[_i2];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
if (isNullish(selectedElement)) {
continue;
try {
for (var _iterator = selectedElements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var selectedElement = _step.value;
if (isNullish(selectedElement)) {
continue;
}
var slist = getTransformList(selectedElement);
if (slist.numberOfItems) {
slist.insertItemBefore(svgroot.createSVGTransform(), 0);
} else {
slist.appendItem(svgroot.createSVGTransform());
}
}
var slist = getTransformList(selectedElement);
if (slist.numberOfItems) {
slist.insertItemBefore(svgroot.createSVGTransform(), 0);
} else {
slist.appendItem(svgroot.createSVGTransform());
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
@@ -15787,7 +15810,7 @@
break;
}
case 'square': // FIXME: once we create the rect, we lose information that this was a square
case 'square': // TODO: once we create the rect, we lose information that this was a square
// (for resizing purposes this could be important)
// Fallthrough
@@ -17729,11 +17752,11 @@
}
});
});
var _i3 = attrs.length;
var _i2 = attrs.length;
var attrNames = ['width', 'height', 'xmlns', 'x', 'y', 'viewBox', 'id', 'overflow'];
while (_i3--) {
var attr = attrs[_i3];
while (_i2--) {
var attr = attrs[_i2];
var attrVal = toXml(attr.value); // Namespaces have already been dealt with, so skip
if (attr.nodeName.startsWith('xmlns:')) {
@@ -17759,8 +17782,8 @@
var mozAttrs = ['-moz-math-font-style', '_moz-math-font-style'];
for (var _i4 = attrs.length - 1; _i4 >= 0; _i4--) {
var _attr = attrs[_i4];
for (var _i3 = attrs.length - 1; _i3 >= 0; _i3--) {
var _attr = attrs[_i3];
var _attrVal = toXml(_attr.value); // remove bogus attributes added by Gecko
@@ -17816,14 +17839,14 @@
indent++;
var bOneLine = false;
for (var _i5 = 0; _i5 < childs.length; _i5++) {
var child = childs.item(_i5);
for (var _i4 = 0; _i4 < childs.length; _i4++) {
var child = childs.item(_i4);
switch (child.nodeType) {
case 1:
// element node
out.push('\n');
out.push(this.svgToString(childs.item(_i5), indent));
out.push(this.svgToString(childs.item(_i4), indent));
break;
case 3:
@@ -17865,7 +17888,7 @@
if (!bOneLine) {
out.push('\n');
for (var _i6 = 0; _i6 < indent; _i6++) {
for (var _i5 = 0; _i5 < indent; _i5++) {
out.push(' ');
}
}
@@ -18941,27 +18964,27 @@
}
var attrs = svg.attributes;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator = attrs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var attr = _step.value;
for (var _iterator2 = attrs[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var attr = _step2.value;
// Ok for `NamedNodeMap`
symbol.setAttribute(attr.nodeName, attr.value);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
@@ -19186,29 +19209,29 @@
elem = $$9(elem).data('gsvg') || $$9(elem).data('symbol') || elem;
var childs = elem.childNodes;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (var _iterator2 = childs[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var child = _step2.value;
for (var _iterator3 = childs[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var child = _step3.value;
if (child.nodeName === 'title') {
return child.textContent;
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {
_iterator3["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
@@ -19276,13 +19299,13 @@
var docTitle = false,
oldTitle = '';
var batchCmd = new BatchCommand$1('Change Image Title');
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
var _iteratorNormalCompletion4 = true;
var _didIteratorError4 = false;
var _iteratorError4 = undefined;
try {
for (var _iterator3 = childs[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var child = _step3.value;
for (var _iterator4 = childs[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
var child = _step4.value;
if (child.nodeName === 'title') {
docTitle = child;
@@ -19291,16 +19314,16 @@
}
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
_didIteratorError4 = true;
_iteratorError4 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {
_iterator3["return"]();
if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) {
_iterator4["return"]();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
if (_didIteratorError4) {
throw _iteratorError4;
}
}
}
@@ -20609,7 +20632,7 @@
canvas.moveSelectedElements(diffX * currentZoom, diffY * currentZoom, true);
return "continue";
} // only allow the transform/opacity/filter attribute to change on <g> elements, slightly hacky
// TODO: FIXME: Missing statement body
// TODO: Missing statement body
// if (elem.tagName === 'g' && goodGAttrs.includes(attr)) {}
@@ -21288,9 +21311,9 @@
this.moveToTopSelectedElement = function () {
var _selectedElements2 = selectedElements,
_selectedElements3 = _slicedToArray(_selectedElements2, 1),
selected = _selectedElements3[0];
var _selectedElements = selectedElements,
_selectedElements2 = _slicedToArray(_selectedElements, 1),
selected = _selectedElements2[0];
if (!isNullish(selected)) {
var t = selected;
@@ -21315,9 +21338,9 @@
this.moveToBottomSelectedElement = function () {
var _selectedElements4 = selectedElements,
_selectedElements5 = _slicedToArray(_selectedElements4, 1),
selected = _selectedElements5[0];
var _selectedElements3 = selectedElements,
_selectedElements4 = _slicedToArray(_selectedElements3, 1),
selected = _selectedElements4[0];
if (!isNullish(selected)) {
var t = selected;
@@ -21625,45 +21648,45 @@
var dx = new Array(len);
var dy = new Array(len);
for (var _i7 = 0; _i7 < len; ++_i7) {
if (isNullish(selectedElements[_i7])) {
for (var _i6 = 0; _i6 < len; ++_i6) {
if (isNullish(selectedElements[_i6])) {
break;
} // const elem = selectedElements[i];
var bbox = bboxes[_i7];
dx[_i7] = 0;
dy[_i7] = 0;
var bbox = bboxes[_i6];
dx[_i6] = 0;
dy[_i6] = 0;
switch (type) {
case 'l':
// left (horizontal)
dx[_i7] = minx - bbox.x;
dx[_i6] = minx - bbox.x;
break;
case 'c':
// center (horizontal)
dx[_i7] = (minx + maxx) / 2 - (bbox.x + bbox.width / 2);
dx[_i6] = (minx + maxx) / 2 - (bbox.x + bbox.width / 2);
break;
case 'r':
// right (horizontal)
dx[_i7] = maxx - (bbox.x + bbox.width);
dx[_i6] = maxx - (bbox.x + bbox.width);
break;
case 't':
// top (vertical)
dy[_i7] = miny - bbox.y;
dy[_i6] = miny - bbox.y;
break;
case 'm':
// middle (vertical)
dy[_i7] = (miny + maxy) / 2 - (bbox.y + bbox.height / 2);
dy[_i6] = (miny + maxy) / 2 - (bbox.y + bbox.height / 2);
break;
case 'b':
// bottom (vertical)
dy[_i7] = maxy - (bbox.y + bbox.height);
dy[_i6] = maxy - (bbox.y + bbox.height);
break;
}
}
@@ -22829,14 +22852,14 @@
/**
*
* @param {boolean} [toImage]
* @param {external:jQuery.svgIcons.Fallback} [fallback]
* @param {external:jQuery.svgIcons.Fallback} [fallback=false]
* @returns {void}
*/
function makeIcons() {
var toImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var fallback = arguments.length > 1 ? arguments[1] : undefined;
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (iconsMade) return;
if (opts.no_img) toImage = false;
var tempHolder;
@@ -30171,90 +30194,90 @@
},
'div#workarea': {
left: 38,
top: 74 // '#tools_bottom': {
// left: {s: '27px', l: '46px', xl: '65px'},
// height: {s: '58px', l: '98px', xl: '145px'}
// },
// '#color_tools': {
// 'border-spacing': {s: '0 1px'},
// 'margin-top': {s: '-1px'}
// },
// '#color_tools .icon_label': {
// width: {l:'43px', xl: '60px'}
// },
// '.color_tool': {
// height: {s: '20px'}
// },
// '#tool_opacity': {
// top: {s: '1px'},
// height: {s: 'auto', l:'auto', xl:'auto'}
// },
// '#tools_top input, #tools_bottom input': {
// 'margin-top': {s: '2px', l: '4px', xl: '5px'},
// height: {s: 'auto', l: 'auto', xl: 'auto'},
// border: {s: '1px solid #555', l: 'auto', xl: 'auto'},
// 'font-size': {s: '.9em', l: '1.2em', xl: '1.4em'}
// },
// '#zoom_panel': {
// 'margin-top': {s: '3px', l: '4px', xl: '5px'}
// },
// '#copyright, #tools_bottom .label': {
// 'font-size': {l: '1.5em', xl: '2em'},
// 'line-height': {s: '15px'}
// },
// '#tools_bottom_2': {
// width: {l: '295px', xl: '355px'},
// top: {s: '4px'}
// },
// '#tools_top > div, #tools_top': {
// 'line-height': {s: '17px', l: '34px', xl: '50px'}
// },
// '.dropdown button': {
// height: {s: '18px', l: '34px', xl: '40px'},
// 'line-height': {s: '18px', l: '34px', xl: '40px'},
// 'margin-top': {s: '3px'}
// },
// '#tools_top label, #tools_bottom label': {
// 'font-size': {s: '1em', l: '1.5em', xl: '2em'},
// height: {s: '25px', l: '42px', xl: '64px'}
// },
// 'div.toolset': {
// height: {s: '25px', l: '42px', xl: '64px'}
// },
// '#tool_bold, #tool_italic': {
// 'font-size': {s: '1.5em', l: '3em', xl: '4.5em'}
// },
// '#sidepanels': {
// top: {s: '50px', l: '88px', xl: '125px'},
// bottom: {s: '51px', l: '68px', xl: '65px'}
// },
// '#layerbuttons': {
// width: {l: '130px', xl: '175px'},
// height: {l: '24px', xl: '30px'}
// },
// '#layerlist': {
// width: {l: '128px', xl: '150px'}
// },
// '.layer_button': {
// width: {l: '19px', xl: '28px'},
// height: {l: '19px', xl: '28px'}
// },
// 'input.spin-button': {
// 'background-image': {l: 'url('images/spinbtn_updn_big.png')', xl: 'url('images/spinbtn_updn_big.png')'},
// 'background-position': {l: '100% -5px', xl: '100% -2px'},
// 'padding-right': {l: '24px', xl: '24px' }
// },
// 'input.spin-button.up': {
// 'background-position': {l: '100% -45px', xl: '100% -42px'}
// },
// 'input.spin-button.down': {
// 'background-position': {l: '100% -85px', xl: '100% -82px'}
// },
// '#position_opts': {
// width: {all: (size_num*4) +'px'}
// }
top: 74
} // '#tools_bottom': {
// left: {s: '27px', l: '46px', xl: '65px'},
// height: {s: '58px', l: '98px', xl: '145px'}
// },
// '#color_tools': {
// 'border-spacing': {s: '0 1px'},
// 'margin-top': {s: '-1px'}
// },
// '#color_tools .icon_label': {
// width: {l:'43px', xl: '60px'}
// },
// '.color_tool': {
// height: {s: '20px'}
// },
// '#tool_opacity': {
// top: {s: '1px'},
// height: {s: 'auto', l:'auto', xl:'auto'}
// },
// '#tools_top input, #tools_bottom input': {
// 'margin-top': {s: '2px', l: '4px', xl: '5px'},
// height: {s: 'auto', l: 'auto', xl: 'auto'},
// border: {s: '1px solid #555', l: 'auto', xl: 'auto'},
// 'font-size': {s: '.9em', l: '1.2em', xl: '1.4em'}
// },
// '#zoom_panel': {
// 'margin-top': {s: '3px', l: '4px', xl: '5px'}
// },
// '#copyright, #tools_bottom .label': {
// 'font-size': {l: '1.5em', xl: '2em'},
// 'line-height': {s: '15px'}
// },
// '#tools_bottom_2': {
// width: {l: '295px', xl: '355px'},
// top: {s: '4px'}
// },
// '#tools_top > div, #tools_top': {
// 'line-height': {s: '17px', l: '34px', xl: '50px'}
// },
// '.dropdown button': {
// height: {s: '18px', l: '34px', xl: '40px'},
// 'line-height': {s: '18px', l: '34px', xl: '40px'},
// 'margin-top': {s: '3px'}
// },
// '#tools_top label, #tools_bottom label': {
// 'font-size': {s: '1em', l: '1.5em', xl: '2em'},
// height: {s: '25px', l: '42px', xl: '64px'}
// },
// 'div.toolset': {
// height: {s: '25px', l: '42px', xl: '64px'}
// },
// '#tool_bold, #tool_italic': {
// 'font-size': {s: '1.5em', l: '3em', xl: '4.5em'}
// },
// '#sidepanels': {
// top: {s: '50px', l: '88px', xl: '125px'},
// bottom: {s: '51px', l: '68px', xl: '65px'}
// },
// '#layerbuttons': {
// width: {l: '130px', xl: '175px'},
// height: {l: '24px', xl: '30px'}
// },
// '#layerlist': {
// width: {l: '128px', xl: '150px'}
// },
// '.layer_button': {
// width: {l: '19px', xl: '28px'},
// height: {l: '19px', xl: '28px'}
// },
// 'input.spin-button': {
// 'background-image': {l: 'url('images/spinbtn_updn_big.png')', xl: 'url('images/spinbtn_updn_big.png')'},
// 'background-position': {l: '100% -5px', xl: '100% -2px'},
// 'padding-right': {l: '24px', xl: '24px' }
// },
// 'input.spin-button.up': {
// 'background-position': {l: '100% -45px', xl: '100% -42px'}
// },
// 'input.spin-button.down': {
// 'background-position': {l: '100% -85px', xl: '100% -82px'}
// },
// '#position_opts': {
// width: {all: (size_num*4) +'px'}
// }
}
};
var ruleElem = $$b('#tool_size_rules');
@@ -30758,7 +30781,7 @@
var num = 5 - $$b('#layerlist tr.layer').size();
while (num-- > 0) {
// FIXME: there must a better way to do this
// TODO: there must a better way to do this
layerlist.append('<tr><td style="color:white">_</td><td/></tr>');
}
};