Move a couple functions into units.js

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1848 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2010-11-06 00:45:21 +00:00
parent 09a6a7c307
commit e64bee32a8
4 changed files with 115 additions and 94 deletions

View File

@@ -10,6 +10,9 @@
*
*/
// Dependencies:
// 1) svgcanvas.js
(function() {
if(!window.svgEditor) window.svgEditor = function($) {
@@ -1816,7 +1819,7 @@
} else if(curConfig.baseUnit !== 'px') {
// Convert unitless value to one with given unit
var unitData = svgCanvas.getUnits();
var unitData = svgedit.units.getTypeMap();
if(selectedElement[attr] || svgCanvas.getMode() === "pathedit" || attr === "x" || attr === "y") {
val *= unitData[curConfig.baseUnit];
@@ -4270,7 +4273,7 @@
var c_elem = svgCanvas.getContentElem();
var units = svgCanvas.getUnits();
var units = svgedit.units.getTypeMap();
var unit = units[curConfig.baseUnit]; // 1 = 1px
for(var d = 0; d < 2; d++) {