- Fix Cannot call method 'set' of null. This occurs on zoomIn and zoomOut of print.

This commit is contained in:
Paulo Gustavo Veiga 2012-09-03 22:16:36 -03:00
parent 6008376ad5
commit 3f173ec2f1

View File

@ -20,14 +20,17 @@ mindplot.widget.ToolbarNotifier = new Class({
initialize:function () { initialize:function () {
var container = $('headerNotifier'); var container = $('headerNotifier');
this._effect = new Fx.Elements(container, { // In case of print,embedded no message is displayed ....
onComplete:function () { if (container) {
container.setStyle('display', 'none'); this._effect = new Fx.Elements(container, {
}.bind(this), onComplete:function () {
link:'cancel', container.setStyle('display', 'none');
duration:8000, }.bind(this),
transition:Fx.Transitions.Expo.easeInOut link:'cancel',
}); duration:8000,
transition:Fx.Transitions.Expo.easeInOut
});
}
}, },
logError:function (userMsg) { logError:function (userMsg) {
@ -42,24 +45,28 @@ mindplot.widget.ToolbarNotifier = new Class({
$assert(msg, 'msg can not be null'); $assert(msg, 'msg can not be null');
var container = $('headerNotifier'); var container = $('headerNotifier');
container.set('text', msg);
container.setStyle('display', 'block');
container.position({
relativeTo:$('header'),
position:'upperCenter',
edge:'centerTop'
});
if (!$defined(fade) || fade) { // In case of print,embedded no message is displayed ....
this._effect.start({ if (container) {
0:{ container.set('text', msg);
opacity:[1, 0] container.setStyle('display', 'block');
} container.position({
relativeTo:$('header'),
position:'upperCenter',
edge:'centerTop'
}); });
} else { if (!$defined(fade) || fade) {
container.setStyle('opacity', '1'); this._effect.start({
this._effect.pause(); 0:{
opacity:[1, 0]
}
});
} else {
container.setStyle('opacity', '1');
this._effect.pause();
}
} }
} }