+ aMaxHeight = nodeY;
+
+ // if aMaxWidth and aMaxHeight is greater than the current size
+ // of the canvas, we resize canvas to these new width and height
+ if ( aMaxWidth > this->width() || aMaxHeight > this->height() )
+ this->resize( aMaxWidth > this->width() ? aMaxWidth : this->width(),
+ aMaxHeight > this->height() ? aMaxHeight : this->height() );