fix the cicular reference
parent
4f882a947a
commit
ebffaa4bf0
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
import {NS} from './namespaces.js';
|
import {NS} from './namespaces.js';
|
||||||
import {getTransformList} from './svgtransformlist.js';
|
import {getTransformList} from './svgtransformlist.js';
|
||||||
import {isNullish} from './utilities.js';
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const NEAR_ZERO = 1e-14;
|
const NEAR_ZERO = 1e-14;
|
||||||
|
@ -152,7 +151,7 @@ export const transformBox = function (l, t, w, h, m) {
|
||||||
* @returns {SVGTransform} A single matrix transform object
|
* @returns {SVGTransform} A single matrix transform object
|
||||||
*/
|
*/
|
||||||
export const transformListToTransform = function (tlist, min, max) {
|
export const transformListToTransform = function (tlist, min, max) {
|
||||||
if (isNullish(tlist)) {
|
if (!tlist) {
|
||||||
// Or should tlist = null have been prevented before this?
|
// Or should tlist = null have been prevented before this?
|
||||||
return svg.createSVGTransformFromMatrix(svg.createSVGMatrix());
|
return svg.createSVGTransformFromMatrix(svg.createSVGMatrix());
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {NS} from './namespaces.js';
|
import {NS} from './namespaces.js';
|
||||||
import {isNullish} from './utilities.js';
|
|
||||||
|
|
||||||
const wAttrs = ['x', 'x1', 'cx', 'rx', 'width'];
|
const wAttrs = ['x', 'x1', 'cx', 'rx', 'width'];
|
||||||
const hAttrs = ['y', 'y1', 'cy', 'ry', 'height'];
|
const hAttrs = ['y', 'y1', 'cy', 'ry', 'height'];
|
||||||
|
@ -306,7 +305,7 @@ export const isValidUnit = function (attr, val, selectedElement) {
|
||||||
// not already present
|
// not already present
|
||||||
try {
|
try {
|
||||||
const elem = elementContainer_.getElement(val);
|
const elem = elementContainer_.getElement(val);
|
||||||
result = (isNullish(elem) || elem === selectedElement);
|
result = (!elem || elem === selectedElement);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue