Fix Firefox bugs ...

This commit is contained in:
Paulo Gustavo Veiga 2012-03-08 00:11:54 -03:00
parent 7c10b00435
commit 0f2af2cb74
3 changed files with 19 additions and 8 deletions

View File

@ -1173,7 +1173,7 @@ mindplot.Topic = new Class({
var relationships = child.getRelationships();
result = result.concat(relationships);
var innerChilds = core.Utils.flattenTopicChildElements(child);
var innerChilds = this._flatten2DElements(child);
result = result.concat(innerChilds);
}
return result;

View File

@ -155,14 +155,25 @@ web2d.peer.svg.TextPeer = new Class({
},
getWidth : function () {
var computedWidth = this._native.getBBox().width;
// Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround
try {
var computedWidth = this._native.getBBox().width;
} catch(e) {
computedWidth = 10;
}
var width = parseInt(computedWidth);
width = width + this._font.getWidthMargin();
return width;
},
getHeight : function () {
var computedHeight = this._native.getBBox().height;
// Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround
try {
var computedHeight = this._native.getBBox().height;
} catch(e) {
computedHeight = 10;
}
return parseInt(computedHeight);
},

View File

@ -38,11 +38,11 @@ function buildDesigner(options) {
console.log(e);
});
// window.onerror = function()
// {
// errorDialog.show();
// };
//
window.onerror = function()
{
errorDialog.show();
};
// Configure default persistence manager ...
var persistence;
if (options.persistenceManager) {