MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / bindEvents

Method bindEvents

xadmin-dashboard/src/widgets/WebGL.js:37–53  ·  view source on GitHub ↗
(instance, events)

Source from the content-addressed store, hash-verified

35
36 //bind the events
37 bindEvents(instance, events) {
38 let _loop = (eventName) => {
39 // ignore the event config which not satisfy
40 if (typeof eventName === 'string' && typeof events[eventName] === 'function') {
41 // binding event
42 instance.off(eventName)
43 instance.on(eventName, (param) => {
44 events[eventName](param, instance)
45 })
46 }
47 }
48
49 for (let eventName in events) {
50 _loop(eventName)
51 }
52
53 }
54
55 // render the dom
56 renderGLDom(cb) {

Callers 1

EChartBase.jsFile · 0.45

Calls 1

_loopFunction · 0.85

Tested by

no test coverage detected