kfb-view 3.1.5 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/view.js CHANGED
@@ -107,6 +107,14 @@ export default class KfbView extends EventEmitter {
107
107
  width,
108
108
  height,
109
109
  };
110
+ this.mitt = {
111
+ $on: this.$on,
112
+ $emit: this.$emit,
113
+ $off: this.$off,
114
+ $once: this.$once,
115
+ key: this.key,
116
+ eventList: this.eventList,
117
+ };
110
118
  initOpenDragon(this);
111
119
  initComponents(this);
112
120
  initEvent(this);
@@ -257,6 +265,7 @@ function initNavigator(kv) {
257
265
  containerWidth: config.width,
258
266
  element: navigator,
259
267
  scale: config.scale,
268
+ mitt: kv.mitt,
260
269
  ...config.navigator,
261
270
  });
262
271
  }
@@ -283,6 +292,7 @@ function initComponentsOptions(kv, type) {
283
292
  cache: kv.cache,
284
293
  canvas: createCanvas(kv),
285
294
  options: {
295
+ mitt: kv.mitt,
286
296
  scale: config.scale,
287
297
  labelDrawing: config.labelDrawing,
288
298
  label: config.label || {},