Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [15:46:50] <wboykinm> willwhite: you guys still in the meeting?
- [15:52:50] <wboykinm> willwhite: My earlier question is if you've seen anyone do this before: http://flic.kr/p/bzFaMp
- [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?
- [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
- [15:57:13] <willwhite> wboykinm: I think it should be possible with some adjustment to the wax tooltip logic.
- [15:57:31] <wboykinm> willwhite: ever seen it done?
- [15:57:50] <willwhite> no I haven't
- [15:58:01] <wboykinm> willwhite: breaking ground! Woot!
- [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?
- [15:58:57] <wboykinm> right. ideally in the next available spot in a sidebar list/grid.
- [15:59:05] <wboykinm> This is screaming jQuery.
- [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
- [16:05:22] <willwhite> wboykinm: ^
- [16:05:47] <willwhite> this might be happening on a lower level, though.
- [16:06:02] <wboykinm> willwhite: good point. this is two problems, closure and placement.
- [16:06:52] <willwhite> yeah placement is probably CSS
- [16:07:15] <willwhite> just give each tooltip an index and style it differently... something like that
- [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
- [16:08:37] <willwhite> wboykinm: that code originates from tooltip.js, but is built and placed into the dist directory.
- [16:08:51] <wboykinm> ah, i see the commonality
- [16:08:59] <willwhite> during development I don't recommend using the dist directory, and instead using the individual wax source files.
- [16:09:27] <wboykinm> Cool. I'll give that a shot. Thanks for your help!
- [16:09:33] <willwhite> sure thing!
Advertisement
Add Comment
Please, Sign In to add comment