MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / bind

Method bind

src/common/overlay/levelRenderer/Eventful.js:84–102  ·  view source on GitHub ↗

* @function LevelRenderer.Eventful.prototype.bind * @description 绑定事件。 * @param {string} event - 事件名。 * @param {boolean} handler - 响应函数。 * @param {Object} context - context。 * @returns {LevelRenderer.Eventful} this

(event, handler, context)

Source from the content-addressed store, hash-verified

82 * @returns {LevelRenderer.Eventful} this
83 */
84 bind(event, handler, context) {
85 var _h = this._handlers;
86
87 if (!handler || !event) {
88 return this;
89 }
90
91 if (!_h[event]) {
92 _h[event] = [];
93 }
94
95 _h[event].push({
96 h: handler,
97 one: false,
98 ctx: context || this
99 });
100
101 return this;
102 }
103
104
105 /**

Callers 15

mockCreateTileFunction · 0.80
_bindEventsMethod · 0.80
onAddMethod · 0.80
constructorMethod · 0.80
onAddMethod · 0.80
onAddMethod · 0.80
onAddMethod · 0.80
constructorMethod · 0.80
onAddMethod · 0.80
constructorMethod · 0.80
removeMethod · 0.80
_addHighLightLayerMethod · 0.80

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected