Made editor work better locally in Chrome 5, fixed some minor bugs

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1642 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-07-21 17:12:57 +00:00
parent 86fa551bf9
commit 1a9b08bed6
4 changed files with 14 additions and 3 deletions

View File

@@ -183,6 +183,8 @@ svgEditor.addExtension("imagelib", function() {
background: white;\ background: white;\
margin: 0;\ margin: 0;\
padding: 0;\ padding: 0;\
}\
#imgbrowse > ul {\
overflow: auto;\ overflow: auto;\
}\ }\
#imgbrowse li {\ #imgbrowse li {\

View File

@@ -2495,7 +2495,12 @@
} }
var setIcon = Editor.setIcon = function(elem, icon_id, forcedSize) { var setIcon = Editor.setIcon = function(elem, icon_id, forcedSize) {
var icon = (typeof icon_id == 'string') ? $.getSvgIcon(icon_id).clone() : icon_id.clone(); var icon = (typeof icon_id == 'string') ? $.getSvgIcon(icon_id) : icon_id;
if(!icon) {
console.log('NOTE: Icon image missing: ' + icon_id);
return;
}
icon = icon.clone();
$(elem).empty().append(icon); $(elem).empty().append(icon);
if(forcedSize) { if(forcedSize) {
var obj = {}; var obj = {};

View File

@@ -5564,7 +5564,9 @@ var pathActions = this.pathActions = function() {
8: ['x','y','x1','y1'], 8: ['x','y','x1','y1'],
10: ['x','y','r1','r2','angle','largeArcFlag','sweepFlag'], 10: ['x','y','r1','r2','angle','largeArcFlag','sweepFlag'],
12: ['x'], 12: ['x'],
14: ['y'] 14: ['y'],
16: ['x','y','x2','y2'],
18: ['x','y']
}; };
function retPath() { function retPath() {

View File

@@ -172,7 +172,9 @@ $(function() {
$(function() { $(function() {
getIcons('ajax'); getIcons('ajax');
}); });
} } else {
$(useFallback);
}
} }
} }
}); });