Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectMouseOver doesn't work after triggering SelectedChange #237

Closed
DevArt002 opened this issue Apr 15, 2021 · 5 comments
Closed

ObjectMouseOver doesn't work after triggering SelectedChange #237

DevArt002 opened this issue Apr 15, 2021 · 5 comments
Assignees
Labels
🪲 bug Something isn't working
Milestone

Comments

@DevArt002
Copy link

Hi.
I am going to change cursor when tb object gets hovered. (Not pointer cursor) I added the change functionality under the ObjectMouseOver eventlistener. It works well until tb object is clicked. But once I click the tb object, the ObjectMouseOver eventlistener doesn't work. Maybe, tb object SelectedChange eventlistener blocks ObjectMouseOver

I shared the code snippet:

obj.addEventListener(
  'SelectedChange',
  () => {
    // TODO select
  },
  false,
);
obj.addEventListener(
  'ObjectMouseOver',
  () => {
    // TODO mouse over
    this.map.getCanvasContainer().style.cursor = 'not-allowed';
  },
  false,
);
@DevArt002 DevArt002 added the 🪲 bug Something isn't working label Apr 15, 2021
@jscastro76
Copy link
Owner

Let me check it out

@DevArt002
Copy link
Author

Thank you @jscastro76 !

@jscastro76 jscastro76 self-assigned this Apr 15, 2021
@jscastro76 jscastro76 added this to the v2.2.3. milestone Apr 15, 2021
@jscastro76
Copy link
Owner

You're totally right, "ObjectMouseOver" is only fired if it's not the object selected... my fault surely when combining the different logics for objects/extrusions. I have just solved locally, I'll push the change today to the repo as the first issue of v2.2.3. But it won't be available as module until end of this week

@DevArt002
Copy link
Author

Sounds great! Thanks for letting me know. I can't wait to see the new version soon!

jscastro76 added a commit that referenced this issue Apr 15, 2021
@jscastro76
Copy link
Owner

Available for code testing and bundle use, not available yet as module until v2.2.3 is uploaded to npm
@DevArt002 thanks for detecting it and provide feedback

jscastro76 added a commit that referenced this issue May 8, 2021
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements
- #243 Create a new example on terrain layer
  - New example on terrain layer with a 3D model aligned vertically [21-terrain.html](https://github.com/jscastro76/threebox/blob/master/examples/21-terrain.html)
- #244 Darken the raster layer with realSunlight

#### 🪲 Bug fixes
- #233 map.setLight is not updated when tb.setStyle until the map moves
- #237 `ObjectMouseOver` doesn't work after triggering `SelectedChange`
- #241 KNOWN ISSUE: Terrain layer calculates wrongly the object height
- #242 KNOWN ISSUE: Create a warning for sky layers when used with Mapbox < 2.0

#### 📝 Documentation
- Updated [documentation](/examples/readme.md)
- Updated [Threebox documentation](/docs/Threebox.md) (`terrain` attribute and property, `tb.createTerrainLayer`, `tb.updateSunGround`)
- Updated [Examples](/examples) documentation (new terrain layer in 21).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants