Move camera(view) over edge of map

(buckle2000) #1

Currently in Tiled (Qt), map cannot be scrolled out of the screen.
This is annoying because sometimes I need to place objects outside the map.

October 2016 development updates
(Thorbjørn Lindeijer) #2

Maybe you should update your version of Tiled, because I’ve enabled scrolling past the edges of the map in Tiled 0.15.

(buckle2000) #3

I figured it out…
I am using version 0.17.1224, latest snapshot.
I can scroll past edges of map using “minimap” or middle mouse button, but not I can scroll past edges of map using mouse wheel.

(Thorbjørn Lindeijer) #4

Hmm, right, I could look into allowing it when using the mouse wheel as well. Can’t remember now whether there was some difficulty with this (since mouse wheel is currently handled by Qt) or whether I just thought it might not be a good idea.

(Thorbjørn Lindeijer) #5

Well, I think I originally didn’t do this because I based the over-edge scrolling behavior on GIMP, which also doesn’t allow this. I looked into overriding the bounds checking, but it was not easily possible because it is buried inside QAbstractSliderPrivate::scrollByDelta. So I decided to override the wheel event handling entirely, reimplementing part of its logic:

This change still needs to be tested on a system that supports QWheelEvent::pixelDelta (so with a high-precision mouse, usually). I’ll check whether my Mac Mini does, though it has a regular mouse attached to it.