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/lib/kfb-view.js +1 -1
- package/package.json +2 -1
- package/src/components/area/index.js +9 -9
- package/src/components/board/index.js +8 -8
- package/src/components/common/common.js +5 -5
- package/src/components/graduation/index.js +2 -1
- package/src/components/navigator/index.js +66 -123
- package/src/components/tailoring/index.js +3 -3
- package/src/const/event.js +1 -0
- package/src/util/calculate.js +5 -0
- package/src/util/event-emitter.js +37 -17
- package/src/view.js +10 -0
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 || {},
|