light-chart
Version:
Charts for mobile visualization.
48 lines (35 loc) • 1.06 kB
JavaScript
let isDebugging = false;
let isComboDisabled = false;
const GBridge = {
callEnable: (ref, configArray) => {
// commandsCache[ref] = [];
//
// return GCanvasModule.enable({
// componentId: ref,
// config: configArray
// });
},
callEnableDebug: () => {
isDebugging = true;
},
callEnableDisableCombo: () => {
isComboDisabled = true;
},
callSetContextType: function (componentId, context_type) {
// GCanvasModule.setContextType(context_type, componentId);
},
callReset: function(id){
// GCanvasModule.resetComponent && canvasModule.resetComponent(componentId);
},
render: function() {
},
render2d:function(el,b,c) {
//调用这里是绘图,传递指令给webview即可
if(c.length>0) {
el.runAction(`__api__.canvas.draw("${el._uid}",${JSON.stringify(c)},{antiAliasing:true})`,'')
}
},
callNative: function (componentId, cmdArgs, cache) {
},
};
export default GBridge;