Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2011-09-10 23:21:54 -05:00
commit ddcf022264
2 changed files with 15 additions and 5 deletions

View file

@ -91,7 +91,7 @@ var svgWhiteList_ = {
"mn": [], "mn": [],
"mo": ["fence", "lspace", "maxsize", "minsize", "rspace", "stretchy"], "mo": ["fence", "lspace", "maxsize", "minsize", "rspace", "stretchy"],
"mover": [], "mover": [],
"mpadded": ["lspace", "width"], "mpadded": ["lspace", "width", "height", "depth", "voffset"],
"mphantom": [], "mphantom": [],
"mprescripts": [], "mprescripts": [],
"mroot": [], "mroot": [],

View file

@ -2137,7 +2137,9 @@
// Made public for UI customization. // Made public for UI customization.
// TODO: Group UI functions into a public svgEditor.ui interface. // TODO: Group UI functions into a public svgEditor.ui interface.
Editor.addDropDown = function(elem, callback, dropUp) { Editor.addDropDown = function(elem, callback, dropUp) {
if ($(elem).length == 0) return; // Quit if called on non-existant element
var button = $(elem).find('button'); var button = $(elem).find('button');
var list = $(elem).find('ul').attr('id', $(elem)[0].id + '-list'); var list = $(elem).find('ul').attr('id', $(elem)[0].id + '-list');
if(!dropUp) { if(!dropUp) {
@ -3277,8 +3279,13 @@
(function() { (function() {
workarea.scroll(function() { workarea.scroll(function() {
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft; // TODO: jQuery's scrollLeft/Top() wouldn't require a null check
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop; if ($('#ruler_x').length != 0) {
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft;
}
if ($('#ruler_y').length != 0) {
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop;
}
}); });
}()); }());
@ -4227,7 +4234,10 @@
} }
$('#rulers').toggle(!!curConfig.showRulers); $('#rulers').toggle(!!curConfig.showRulers);
$('#show_rulers')[0].checked = curConfig.showRulers;
if (curConfig.showRulers) {
$('#show_rulers')[0].checked = true;
}
if(curConfig.gridSnapping) { if(curConfig.gridSnapping) {
$('#grid_snapping_on')[0].checked = true; $('#grid_snapping_on')[0].checked = true;
@ -4637,7 +4647,7 @@
updateCanvas(true); updateCanvas(true);
// }); // });
// var revnums = "svg-editor.js ($Rev: 2028 $) "; // var revnums = "svg-editor.js ($Rev: 2037 $) ";
// revnums += svgCanvas.getVersion(); // revnums += svgCanvas.getVersion();
// $('#copyright')[0].setAttribute("title", revnums); // $('#copyright')[0].setAttribute("title", revnums);