File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 156156 // Create Raphael paper
157157 self . paper = new Raphael ( self . $map [ 0 ] , self . mapConf . width , self . mapConf . height ) ;
158158
159- // issue #135: Check if we are drawing on a hidden paper
160- // This is known to cause problem for Raphael and text element boundaries
161- if ( self . isPaperHidden ( ) === true ) {
159+ // issue #135: Check for Raphael bug on text element boundaries
160+ if ( self . checkForRaphaelBBoxBug ( ) === true ) {
162161 self . destroy ( ) ;
163- throw new Error ( "Drawing on hidden paper is not supported (see src/doc for workaround )" ) ;
162+ throw new Error ( "Can't get boundary box for text (is your container hidden? See #135 )" ) ;
164163 }
165164
166165 // add plugin class name on element
17521751 * Wants to override this behavior? Use prototype overriding:
17531752 * $.mapael.prototype.isPaperHidden = function() {return false;};
17541753 */
1755- isPaperHidden : function ( ) {
1754+ checkForRaphaelBBoxBug : function ( ) {
17561755 var self = this ;
17571756 // Draw text, then get its boundaries
17581757 var text_elem = self . paper . text ( - 50 , - 50 , "TEST" ) ;
You can’t perform that action at this time.
0 commit comments