MCPcopy Create free account
hub / github.com/CoderOpen/waimai / constructor

Method constructor

front/components/mpvue-echarts/src/wx-canvas.js:2–9  ·  view source on GitHub ↗
(ctx, canvasId)

Source from the content-addressed store, hash-verified

1export default class WxCanvas {
2 constructor(ctx, canvasId) {
3 this.ctx = ctx;
4 this.canvasId = canvasId;
5 this.chart = null;
6
7 WxCanvas.initStyle(ctx);
8 this.initEvent();
9 }
10
11 getContext(contextType) {
12 return contextType === '2d' ? this.ctx : null;

Callers

nothing calls this directly

Calls 2

initEventMethod · 0.95
initStyleMethod · 0.80

Tested by

no test coverage detected