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