[Geojs-users] Need help to strokeopacity while creating multiple annotation

David Manthey david.manthey at kitware.com
Mon Mar 9 10:32:54 EDT 2020


This should work.  The logic for switching the cursor back to the default
should check if any elements are selected, though.  See here:
https://opengeoscience.github.io/geojs/tutorials/editor/?src=lZLBTuMwEIbvfYpZQLIjea0S6KoEFQ5Ie1qJ4x4QBxNPSiCJI9sJdFHefcdu2kaVVrAn2..MfDPjmV5ZqFULK1ijkXTjHzOAxmjM4OSU3ieC3jk2Hm0GH-8ZLORCwIbOVC6HYPxjTJ3B1WxIrmc94Yyrf6kNWmJSvMwtKo9R4YxsjNyiX0F6Z.GfvqOdjdjWVBtym0aN.j-3EmfBZW0allBVUiuv-APdAB5C3Zdyuav7YhBjK1c7KT2WLiZe852UDo.iQFzIy2PiD3l-TNxLU2I6IRLwMVbs.KbC-P8AzlvzinemMvTt7KlS-SsTE8vvUvvnDNKploG3HU6V-1blpadMXAsoBbQCXhJY3UArHVaYe9RwC3OZLiCD821kUVbVLu.pfL5kB.n.cBQ2bCdh1RunKYbxSFqz-4aHZcOetkqO85S16RyaHq0Ajr2P2PAVdI-jPGRYxTavyRaBtdFlUaLmyT4RwBlnIdOL-16FRWGJzJ3jLO-sM5YJYGurnsJmDV-rq.NfKKtQlfukrrIA.i2a43om0pkauQ5UvUclCWyX4NMuyuYZbelZZA-xmb8_


On Sun, Mar 8, 2020 at 12:47 AM Bhupendra Singh <
Bhupendra.Singh1 at india.nec.com> wrote:

> Thanks David for your reply.
>
>
>
> I tried both the options mouseover/mouseout or mouseon/mouseoff but the
> results are same. Only one annotation is getting highlighted on mouse
>  hover over. I am using below code.
>
>
>
> line.geoOn(geo.event.feature.mouseover, (evt) => {
>
>                                   evt.data.selected = true;
>
>                                   line.modified().draw();
>
>                                   $('.geojs-layer').css('cursor',
> 'pointer');
>
>                                 });
>
>                                 line.geoOn(geo.event.feature.mouseout,
> (evt) => {
>
>                                   evt.data.selected = false;
>
>                                   line.modified().draw();
>
>                                   $('.geojs-layer').css('cursor',
> 'inherit');
>
>                                   $("#geojs
> .geojs-layer").css("pointer-events", "auto");
>
> });
>
>
>
> Thanks & Regards,
>
> Bhupendra
>
>
>
> *From:* David Manthey [mailto:david.manthey at kitware.com]
> *Sent:* 07 March 2020 03:24
> *To:* Bhupendra Singh <Bhupendra.Singh1 at india.nec.com>
> *Cc:* geojs-users at public.kitware.com
> *Subject:* Re: Need help to strokeopacity while creating multiple
> annotation
>
>
>
> If you are using feature events, are you using mouseon/mouseoff or
> mouseover/mouseout?  mouseon and mouseoff are for the "topmost" element
> (though a function can override what it means to be topmost).  mouseover
> and mouseout apply to all features (see
> https://opengeoscience.github.io/geojs/apidocs/geo.event.feature.html#.event:mouseoff,
> etc.)
>
>
>
> On Fri, Mar 6, 2020 at 4:15 AM Bhupendra Singh <
> Bhupendra.Singh1 at india.nec.com> wrote:
>
> Hi Geojs team,
>
>
>
> I observed one behaviour after implementing the Geo JS code , the code is
> only highlighting the latest created annotation all other annotation are
> not highlighting on mouse hover over.
>
>
>
> In the below example, ANO3 is changing the strokeopacity  with mouse hover
> over if I will create the new annotation on the page then that will be only
> highlighted on mouse over hover. I need strokeopacity  should work for all
> the created annotation.
>
>
>
>
>
>
>
> Thanks & Regards,
>
> Bhupendra
> ------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. It shall not attach any liability
> on the originator or NECTI or its affiliates. Any views or opinions
> presented in this email are solely those of the author and may not
> necessarily reflect the opinions of NECTI or its affiliates. Any form of
> reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior written
> consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately.
>
>
>
>
> --
>
> David Manthey
>
> R&D Engineer
> Kitware Inc.
> (518) 881-4439
> ------------------------------
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. It shall not attach any liability
> on the originator or NECTI or its affiliates. Any views or opinions
> presented in this email are solely those of the author and may not
> necessarily reflect the opinions of NECTI or its affiliates. Any form of
> reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior written
> consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately.
>


-- 
David Manthey
R&D Engineer
Kitware Inc.
(518) 881-4439
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/geojs-users/attachments/20200309/e928d03c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 24986 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/geojs-users/attachments/20200309/e928d03c/attachment-0001.png>


More information about the Geojs-users mailing list