@antv/g6-wx

0.0.1 • Public • Published

g6-component-wx

G6 Component for wechat miniapp, it's part of G6Mobile

属性名 默认值 类型 是否必传 描述
width 100 Number canvas 的宽度,这个值是页面中组件的宽度
height 100 Number canvas 的高度,这个值是页面中组件的高度
pixelRatio 1 Number 设备像素比,这个字段很关键!!!不传递绘制的图非高清!!!字段来自 getSystemInfo/getSystemInfoSync
onInit Function canvas 初始化完成后返回,会携带相关的信息回来,具体看下方表格
onTouchEvent Function 所有的 touch 事件都来源这里,如果需要 g6 处理事件,都需自行传递,未统一处理的原因为,业务方可能需自行定制
onError Function canvas 创建失败的回调
style String 就是简单的 css 样式

onInit 函数的回调

参数 描述
context canvas 的 context,由组件创建
rect 组件当前所在的位置
canvas native canvas 返回的 element
renderer 渲染模式,在小程序下,G6Mobile 由两种模式, minimini-native 分别对应 web-canvas 和 native-canvas

demo

https://github.com/openwayne/g6-component-wx-demo

Readme

Keywords

Package Sidebar

Install

npm i @antv/g6-wx

Weekly Downloads

9

Version

0.0.1

License

MIT

Unpacked Size

7.59 kB

Total Files

7

Last publish

Collaborators

  • xuying1027
  • lvisei
  • yisi.wang
  • basketduck
  • biupiubiupiu
  • flash1
  • dreammy23
  • laixingui.lxg
  • zhangjunjie-loki
  • rainy25ghz
  • zeyuwang
  • yanxiong
  • susiwen8
  • freestyle21
  • soundquiet
  • elaine.q.10
  • sturuby
  • sakuya223
  • serializedowen
  • xdzhao
  • yangzhanmei
  • wjgogogo
  • leungwensen
  • dori
  • iaaron
  • yard
  • simaq
  • dxq613
  • intchous
  • susan_ann
  • jinke.li
  • lzxue
  • army8735
  • atool
  • baizn
  • dengfuping
  • neoddish
  • jeffy2012
  • zqlu
  • afc163
  • pomelo-nwu
  • kopiluwaky
  • ccnuzindex
  • panyuqi
  • bubkoo
  • zengyue
  • kasmine
  • boyu.zlj
  • l1ud0ngq1
  • newbyvector
  • winniexing
  • chenluli
  • kn9117
  • xdddst
  • semious2020
  • esora
  • nadia_liu
  • bbsqq
  • mxz96102
  • openwayne
  • pearmini
  • pddpd
  • yiqianyao
  • zhanba
  • cxxxxxn