- 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,6 +20,8 @@ mindplot.widget.ToolbarNotifier = new Class({
initialize:function () {
var container = $('headerNotifier');
// In case of print,embedded no message is displayed ....
if (container) {
this._effect = new Fx.Elements(container, {
onComplete:function () {
container.setStyle('display', 'none');
@ -28,6 +30,7 @@ mindplot.widget.ToolbarNotifier = new Class({
duration:8000,
transition:Fx.Transitions.Expo.easeInOut
});
}
},
logError:function (userMsg) {
@ -42,6 +45,9 @@ mindplot.widget.ToolbarNotifier = new Class({
$assert(msg, 'msg can not be null');
var container = $('headerNotifier');
// In case of print,embedded no message is displayed ....
if (container) {
container.set('text', msg);
container.setStyle('display', 'block');
container.position({
@ -62,6 +68,7 @@ mindplot.widget.ToolbarNotifier = new Class({
this._effect.pause();
}
}
}
});