wboykinm

REDE tooltip shifts

Mar 1st, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. [15:46:50] <wboykinm> willwhite: you guys still in the meeting?
  2. [15:52:50] <wboykinm> willwhite: My earlier question is if you've seen anyone do this before: http://flic.kr/p/bzFaMp
  3. [15:53:42] <wboykinm> While that's a crap mockup, I'd like to alter the tooltip logic to allow 4-6 full tooltips up at once, closed only on user click. Does it muck with the gears too much?
  4. [15:56:12] <wboykinm> willwhite: I think we're in the neighborhood of line 2080 here: https://github.com/mapbox/wax/blob/master/dist/wax.g.js
  5. [15:57:13] <willwhite> wboykinm: I think it should be possible with some adjustment to the wax tooltip logic.
  6. [15:57:31] <wboykinm> willwhite: ever seen it done?
  7. [15:57:50] <willwhite> no I haven't
  8. [15:58:01] <wboykinm> willwhite: breaking ground! Woot!
  9. [15:58:32] <willwhite> so the user clicks on a feature and a tooltip opens. but then when they click on another feature, another one opens without the first closing?
  10. [15:58:57] <wboykinm> right. ideally in the next available spot in a sidebar list/grid.
  11. [15:59:05] <wboykinm> This is screaming jQuery.
  12. [16:05:17] <willwhite> yeah, you may want to start by figuring out how to prevent wax from closing tooltips that are already open. maybe start by putting debug code in this area. https://github.com/mapbox/wax/blob/master/control/lib/tooltip.js#L1917-1924
  13. [16:05:22] <willwhite> wboykinm: ^
  14. [16:05:47] <willwhite> this might be happening on a lower level, though.
  15. [16:06:02] <wboykinm> willwhite: good point. this is two problems, closure and placement.
  16. [16:06:52] <willwhite> yeah placement is probably CSS
  17. [16:07:15] <willwhite> just give each tooltip an index and style it differently... something like that
  18. [16:07:23] <wboykinm> willwhite: Does this get loaded before or after tooltip.js? https://github.com/mapbox/wax/blob/master/dist/wax.g.js#L2116-2164
  19. [16:08:37] <willwhite> wboykinm: that code originates from tooltip.js, but is built and placed into the dist directory.
  20. [16:08:51] <wboykinm> ah, i see the commonality
  21. [16:08:59] <willwhite> during development I don't recommend using the dist directory, and instead using the individual wax source files.
  22. [16:09:27] <wboykinm> Cool. I'll give that a shot. Thanks for your help!
  23. [16:09:33] <willwhite> sure thing!
Advertisement
Add Comment
Please, Sign In to add comment