JasonLautzenheiser / trizbort

Trizbort, the Interactive Fiction Mapper
http://www.trizbort.com
Other
129 stars 35 forks source link

Solution for #459 #461

Closed Nyun0 closed 5 years ago

Nyun0 commented 5 years ago

This is my solution proposition for #459

The tooltip is being re-drawn when it is shown upon panning and moving the element. This causes a rather noticeable tooltip flicker, especially when snap-to-grid is turned off or when panning.

Known "issues":

  1. flicker
  2. when moving the element or panning in a way that the element is not visible on the canvas, the tooltip "stays" near the visible edge
JasonLautzenheiser commented 5 years ago

So in testing this, the tooltip does move with the room now, but the flicker is kinda annoying. But what's worse is the map itself is not panned smoothly. The tooltip will move, then the map kinda "jumps" in behind it. I'd almost rather have it the way it is unless we can clean this up some.

Nyun0 commented 5 years ago

The other way (which I tested first) is to hide the tooltip upon moving an element or panning. The results are really nice, and I was hesitating to go with it as a solution to be honest.

Nyun0 commented 5 years ago

I will create a separate merge request with the second solution - I think it will be better to hide the tooltip instead of redrawing it every frame.

Nyun0 commented 5 years ago

@JasonLautzenheiser, now it should be a lot smoother with f5abb90

JasonLautzenheiser commented 5 years ago

@Nyun0 Sorry for the delay on looking at the latest....I will do so hopefully later today.