File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 var originalTransform = loadImage . transform
2929
3030 loadImage . createCanvas = function ( width , height , offscreen ) {
31- if ( offscreen && window . OffscreenCanvas ) {
31+ if ( offscreen && loadImage . global . OffscreenCanvas ) {
3232 return new OffscreenCanvas ( width , height )
3333 }
3434 var canvas = document . createElement ( 'canvas' )
131131 data = data || { }
132132 var useCanvas =
133133 img . getContext ||
134- ( loadImage . requiresCanvas ( options ) && ! ! window . HTMLCanvasElement )
134+ ( loadImage . requiresCanvas ( options ) &&
135+ ! ! loadImage . global . HTMLCanvasElement )
135136 var width = img . naturalWidth || img . width
136137 var height = img . naturalHeight || img . height
137138 var destWidth = width
Original file line number Diff line number Diff line change 164164 return false
165165 }
166166
167+ loadImage . global = $
168+
167169 if ( typeof define === 'function' && define . amd ) {
168170 define ( function ( ) {
169171 return loadImage
You can’t perform that action at this time.
0 commit comments