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

@@ -8,6 +8,10 @@
*
*/
// Dependencies:
// 1) units.js
// 2) everything else
svgEditor.addExtension("view_grid", function(s) {
var svgdoc = document.getElementById("svgcanvas").ownerDocument,
@@ -78,7 +82,7 @@ svgEditor.addExtension("view_grid", function(s) {
var bgwidth = +canvBG.attr('width');
var bgheight = +canvBG.attr('height');
var units = svgCanvas.getUnits();
var units = svgedit.units.getTypeMap();
var unit = units[svgEditor.curConfig.baseUnit]; // 1 = 1px
var r_intervals = [.01, .1, 1, 10, 100, 1000];