Gcanvas-For-Apache-weex
Gcanvas-For-Apache-weex copied to clipboard
Gcanvas is a third party plugin, and is not developed nor maintained by Apache Weex.
使用网络图片绘制正常,使用本地图片绘制就会读取不到文件 文件路径是'../assets/img/img.png'
# 过程描述 使用 weex 创建全新的项目,并添加该 plugin: ``` weex create test cd test && weex platform add ios weex plugin add weex-gcanvas ``` 打开 platforms/ios/WeexDemo.xcworkspace 无法正确编译。 修改 platforms/ios/Podfile 添加 `pod 'GCanvas',...
我使用canvas api写了几个测试用例,发现很强大。 但是发现了一个问题,也有一些疑问。 一.问题 1.在iOS7上会崩溃 reason: -[UIScreen nativeScale]: unrecognized selector sent to instance 0x175f7c30, 原因在于使用的nativeScale是iOS8 以上的属性,我并不太清楚是否还有其他的地方有用到iOS8 以上的属性,没有做兼容。 2. 如果我向画个圆环,比如参考此链接的代码http://www.jianshu.com/p/d5bf49d8cf11 ,在显示圆形边缘有锯齿,体验较差,猜测是否是设置的尺寸在native转换时小数点的问题? 二.疑问 1.如何使用动画做效果,我使用setInterval,setTimeout 无效。 2.必须在gcanvas.start 中绘制吗?关于gcanvas api是否有相关文档,我没有找到! 希望后续越来越强大!
``` var gcanvas = GCanvas.start(ref); var ctx = gcanvas.getContext('2d'); ctx.fillText("Hello World",10,50); ```  用的是release的0.0.3.5版本的包
一片黑
把官方的代码跑起来。。。显示一片黑,没有报告任何错误 iOS 模拟器运行 [WXSDKEngine registerModule:@"weex-gcanvas" withClass:[WXGCanvasModule class]]; 在iOS代码中 注册模块 然后 js代码中 ` 啊啊啊啊啊啊 ` ` var gcanvas = weex.requireModule ( 'weex-gcanvas') module.exports = { created: function () { console.log('created gcanvas');...
``` import App from './index.vue'; import GCanvas from 'weex-gcanvas' console.log(Vue.component) Vue.component('gcanvas', GCanvas) new Vue( Vue.util.extend({ el: '#root' }, App) ) ``` ``` vue.runtime.js:565 TypeError: Cannot set property 'componentId' of undefined...
期待hilo-weex能早点开放出来
追踪代码如下: js/src/gcanvas.js中: GCanvas的start函数=》 ======= start: function (el, succ, fail) { GLog.d('gcanvas#start=====>>>'); //get device **GBridge.getDeviceInfo(function(e){**//这里是异步操作 if (e.data && e.data.platform == "iOS"){ GCanvasPlatform = 1; ...... } }) } ======== GBridge.**getDeviceInfo**( function(){...
Web版无法运行
week_sdk 0.16.0上运行,**weex.supports is not a function** 12-21 18:05:10.176 15263-15296/com.alibaba.weexTest E/weex: reportJSException >>>> instanceId:1, exception function:createInstance, exception:Exception: TypeError: weex.supports is not a function. (In 'weex.supports("@weex-module/userTrack")', 'weex.supports' is undefined) start@(global function):8:6552 ready@(global...
除了iOS下,通过pod安装直接搞定,js和npm版本乱的一逼,竟没有一个版本与0.0.3.3对应!android则是直接没有对应的包可用,后来直接从0.0.3.3拷js源码在ios上跑通了。 我想知道官方是否已弃坑? 谢谢