markupExt icon indicating copy to clipboard operation
markupExt copied to clipboard

the demo have problem

Open qingfengdaozhang opened this issue 6 years ago • 4 comments

I opened the case and found that the mouse click event location information of the case was wrong. How should I modify it?Firefox and chrome

qingfengdaozhang avatar Dec 11 '18 02:12 qingfengdaozhang

Good morning Michael, first of all thank you very much for your example. It's very usefull for me. I'd like to inform you that i have the same problem reported by "qingfengdaozhang". I clicked on the demo link (with Chrome) but, when i click on a marker, the info-card doesn't appear.

I'd like to run the example correctly on my localhost. I debugged the code and i saw that the variable "this.hovered" is undefined in the event function reported below.

this.onClick = function() { this.updateHitTest(event); if (!this.hovered) return; this.selected = this.hovered; this.update_Line(); this.update_DivLabel('onMarkupClick'); viewer.impl.invalidate(true); viewer.clearSelection(); }

I'd like to ask you some advices on how i could modify the code to correct this wrong behaviour. I tried to modify these parameters in the code but i didn't find a correct configuration:

this.raycaster.params.PointCloud.threshold = 5; // hit-test markup size. Change this if markup 'hover' doesn't work this.size = 150.0; // markup size. Change this if markup size is too big or small

Thank you very much for the good example provided!

Fabrizio

fabrizio5 avatar Feb 12 '19 06:02 fabrizio5

Hi Michael, I have the same problem: I can't see the hover on the marker-icon and the card doesn't appear when I click on the marker (using Chrome). I have tried to debug with only a marker positioned outside of the airplane model, changing the same parameters as Fabrizio, but I didn't find the correct configuration. Can you give us any advice to make the sample functioning? It would be an interesting example! Thanks a lot, Francesca

duffra avatar Mar 03 '19 11:03 duffra

Hi Francesca, in my opinion the demo issue has been introduced with last commit "adjust for offset canvas". I solved my issue doing a revert operation at the commit "added line thickness".

You can see the differences between the two commits in the "Code" tab of github.

Regards, Fabrizio

fabrizio5 avatar Mar 03 '19 13:03 fabrizio5

Hi Fabrizio, thanks for your reply! I think you're right, I've seen also this issue > https://github.com/wallabyway/markupExt/issues/5#issue-410185546 and it seems a problem in the Canvas Coordinate Transformation. The previous commit was very similar to the last version by @Clydewang. After that change the code runs, but one mark remains always not functioning. You can see a screenshot and an extract of the code in my last post at the link above.

Can you check for that? Thanks :) Francesca

duffra avatar Mar 03 '19 15:03 duffra