midzer/tobii

zoom icon

viliusle opened this issue · 5 comments

  1. Zoom icon is nice to have, but sometimes it must be disabled. Right now having button with image inside, zoom icon will appear and it will not look good.

Solution could be checking for data-zoom="false".

  1. using inline SVG for zoom icon for each of link is bad for performance. CSS should be used. Even it is not big deal, but having this activated by default for bis site will be a problem for performance. There is good tip:

If we need SVG(s) for backgrounds but they are < than 5k each:
.bg { background: url('data:image/svg+xml;utf8,<svg ...> ... '); }

If we need SVG(s) for backgrounds but they are > than 5k each:
.bg { background: url('images/file.svg'); }

I don't use the zoom icon in my projects myself. I just have it disabled via tobii config.

@viliusle Wanna contribute on this one? I think its only a minor change to the code.

@midzer I am going to create lots of issues, sorry about that. After that I plan to contribute with multiple PR, if I will success with building, but I don't see any documentation about it.

Basically I am trying to use this lib on few site(s) that use lots of various use cases of lightbox.

p.s. you can reject low priority issues, but having some topics on issues list could help. Maybe other users will contribute or provide more details in future.

There are also problems about inline SVG. I updated first comment. One day we should fix it too.

p.s. right now disable zoom icon is right choice, but then it should not be activated by default.

As it would be a breaking change, we go for v3 on this one

We delay the default parameter change for a v3 and use this data-zoom update for v2.3.0