- Linting (ESLint): Fix other indents besides main (though continue to disable check)
parent
fff77db4f1
commit
25b1e9be01
|
@ -46,6 +46,7 @@ if (window.opera) {
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// container - The container HTML element that should hold the SVG root element
|
// container - The container HTML element that should hold the SVG root element
|
||||||
// config - An object that contains configuration data
|
// config - An object that contains configuration data
|
||||||
|
|
||||||
$.SvgCanvas = function (container, config) {
|
$.SvgCanvas = function (container, config) {
|
||||||
// Alias Namespace constants
|
// Alias Namespace constants
|
||||||
var NS = svgedit.NS;
|
var NS = svgedit.NS;
|
||||||
|
@ -72,7 +73,8 @@ var canvas = this;
|
||||||
var svgdoc = container.ownerDocument;
|
var svgdoc = container.ownerDocument;
|
||||||
|
|
||||||
// This is a container for the document being edited, not the document itself.
|
// This is a container for the document being edited, not the document itself.
|
||||||
var svgroot = svgdoc.importNode(svgedit.utilities.text2xml(
|
var svgroot = svgdoc.importNode(
|
||||||
|
svgedit.utilities.text2xml(
|
||||||
'<svg id="svgroot" xmlns="' + NS.SVG + '" xlinkns="' + NS.XLINK + '" ' +
|
'<svg id="svgroot" xmlns="' + NS.SVG + '" xlinkns="' + NS.XLINK + '" ' +
|
||||||
'width="' + dimensions[0] + '" height="' + dimensions[1] + '" x="' + dimensions[0] + '" y="' + dimensions[1] + '" overflow="visible">' +
|
'width="' + dimensions[0] + '" height="' + dimensions[1] + '" x="' + dimensions[0] + '" y="' + dimensions[1] + '" overflow="visible">' +
|
||||||
'<defs>' +
|
'<defs>' +
|
||||||
|
@ -85,7 +87,8 @@ var svgroot = svgdoc.importNode(svgedit.utilities.text2xml(
|
||||||
'</feMerge>' +
|
'</feMerge>' +
|
||||||
'</filter>' +
|
'</filter>' +
|
||||||
'</defs>' +
|
'</defs>' +
|
||||||
'</svg>').documentElement,
|
'</svg>'
|
||||||
|
).documentElement,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
container.appendChild(svgroot);
|
container.appendChild(svgroot);
|
||||||
|
@ -466,15 +469,14 @@ var restoreRefElems = function (elem) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
(function () {
|
// (function () {
|
||||||
// TODO For Issue 208: this is a start on a thumbnail
|
// TODO For Issue 208: this is a start on a thumbnail
|
||||||
// var svgthumb = svgdoc.createElementNS(NS.SVG, 'use');
|
// var svgthumb = svgdoc.createElementNS(NS.SVG, 'use');
|
||||||
// svgthumb.setAttribute('width', '100');
|
// svgthumb.setAttribute('width', '100');
|
||||||
// svgthumb.setAttribute('height', '100');
|
// svgthumb.setAttribute('height', '100');
|
||||||
// svgedit.utilities.setHref(svgthumb, '#svgcontent');
|
// svgedit.utilities.setHref(svgthumb, '#svgcontent');
|
||||||
// svgroot.appendChild(svgthumb);
|
// svgroot.appendChild(svgthumb);
|
||||||
|
// }());
|
||||||
}());
|
|
||||||
|
|
||||||
// Object to contain image data for raster images that were found encodable
|
// Object to contain image data for raster images that were found encodable
|
||||||
var encodableImages = {},
|
var encodableImages = {},
|
||||||
|
@ -3800,9 +3802,9 @@ this.svgToString = function (elem, indent) {
|
||||||
// Note that this also means we should properly deal with this on import
|
// Note that this also means we should properly deal with this on import
|
||||||
// if (curConfig.baseUnit !== 'px') {
|
// if (curConfig.baseUnit !== 'px') {
|
||||||
// var unit = curConfig.baseUnit;
|
// var unit = curConfig.baseUnit;
|
||||||
// var unit_m = svgedit.units.getTypeMap()[unit];
|
// var unitM = svgedit.units.getTypeMap()[unit];
|
||||||
// res.w = svgedit.units.shortFloat(res.w / unit_m)
|
// res.w = svgedit.units.shortFloat(res.w / unitM);
|
||||||
// res.h = svgedit.units.shortFloat(res.h / unit_m)
|
// res.h = svgedit.units.shortFloat(res.h / unitM);
|
||||||
// vb = ' viewBox="' + [0, 0, res.w, res.h].join(' ') + '"';
|
// vb = ' viewBox="' + [0, 0, res.w, res.h].join(' ') + '"';
|
||||||
// res.w += unit;
|
// res.w += unit;
|
||||||
// res.h += unit;
|
// res.h += unit;
|
||||||
|
|
Loading…
Reference in New Issue