Added functionality and dark mode to doctests. And other changes in maps.
This commit is contained in:
@@ -89,15 +89,15 @@ export class AdvancedScatterContainer extends ScatterContainer {
|
||||
let interactionManager = this.renderer.plugins.interaction
|
||||
|
||||
let displayObject = interactionManager.hitTest(local, this)
|
||||
|
||||
if (displayObject.dontBlockScatter && displayObject.parent != null) {
|
||||
displayObject = interactionManager.hitTest(local, displayObject.parent)
|
||||
if (displayObject != null) {
|
||||
if (displayObject.dontBlockScatter && displayObject.parent != null) {
|
||||
displayObject = interactionManager.hitTest(local, displayObject.parent)
|
||||
}
|
||||
|
||||
if (displayObject.scatter != null) this.hitScatter = displayObject.scatter
|
||||
if (this.claimEvents) event.claimedByScatter = this.hitScatter
|
||||
}
|
||||
|
||||
if (displayObject != null && displayObject.scatter != null) this.hitScatter = displayObject.scatter
|
||||
if (this.claimEvents) event.claimedByScatter = this.hitScatter
|
||||
|
||||
|
||||
return this.hitScatter
|
||||
}
|
||||
}
|
||||
@@ -255,6 +255,23 @@ class AdvancedScatter extends DisplayObjectScatter {
|
||||
}
|
||||
|
||||
export class SubmapScatter extends DisplayObjectScatter {
|
||||
constructor(displayObject, renderer, opts = {}) {
|
||||
/*
|
||||
Currently the submaps are only working on one scale to
|
||||
avoid recalculations of the shown map.
|
||||
|
||||
Therfore we force the scatter to not be scaleable.
|
||||
*/
|
||||
Object.assign(opts, {
|
||||
minScale: 1,
|
||||
maxScale: 1,
|
||||
startScale: 1,
|
||||
scalable: false
|
||||
})
|
||||
|
||||
super(displayObject, renderer, opts)
|
||||
}
|
||||
|
||||
get width() {
|
||||
return this.displayObject.width * this.displayObject.scale.x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user