weex-gcanvas
Advanced tools
Comparing version 0.5.18 to 0.5.20
@@ -754,18 +754,39 @@ var GBridge = require("./gutil").GBridge; | ||
{ | ||
GBridge.bindImageTexture(that.componentId, image.src, function(e){ | ||
if( !e.error ) | ||
{ | ||
if(image.width === 0 && e.width > 0){ | ||
image.width = e.width; | ||
} | ||
if(typeof callGCanvasLinkNative !== 'undefined') { | ||
GLog.d('gcontext2d#drawImage() with callGCanvasLinkNative'); | ||
GBridge.bindImageTexture(that.componentId, image.src, cacheKey, function(e){ | ||
if( !e.error ) | ||
{ | ||
if(image.width === 0 && e.width > 0){ | ||
image.width = e.width; | ||
} | ||
if(image.height === 0 && e.height > 0){ | ||
image.height = e.height; | ||
} | ||
that._concatDrawCmd(numArgs, image, sx, sy, sw, sh, dx, dy, dw, dh); | ||
// that._saveImageTexture(image.src, image); | ||
that._saveImageTexture(cacheKey, image); | ||
if(image.height === 0 && e.height > 0){ | ||
image.height = e.height; | ||
} | ||
that._concatDrawCmd(numArgs, image, sx, sy, sw, sh, dx, dy, dw, dh); | ||
// that._saveImageTexture(image.src, image); | ||
that._saveImageTexture(cacheKey, image); | ||
} | ||
}); | ||
} | ||
}); | ||
} else { | ||
GLog.d('gcontext2d#drawImage()'); | ||
GBridge.bindImageTexture(that.componentId, image.src, function(e){ | ||
if( !e.error ) | ||
{ | ||
if(image.width === 0 && e.width > 0){ | ||
image.width = e.width; | ||
} | ||
if(image.height === 0 && e.height > 0){ | ||
image.height = e.height; | ||
} | ||
that._concatDrawCmd(numArgs, image, sx, sy, sw, sh, dx, dy, dw, dh); | ||
// that._saveImageTexture(image.src, image); | ||
that._saveImageTexture(cacheKey, image); | ||
} | ||
}); | ||
} | ||
} | ||
@@ -772,0 +793,0 @@ }; |
{ | ||
"name": "weex-gcanvas", | ||
"version": "0.5.18", | ||
"version": "0.5.20", | ||
"main":"gcanvas.js", | ||
@@ -5,0 +5,0 @@ "platform": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240183
6584