Merge branch 'zoom_in_clipping_fix' into ac35_map_boundary
This commit is contained in:
@@ -576,7 +576,12 @@ public class RaceViewController extends Controller {
|
|||||||
|
|
||||||
// Bind zooming to scrolling
|
// Bind zooming to scrolling
|
||||||
view3D.setOnScroll(e -> {
|
view3D.setOnScroll(e -> {
|
||||||
view3D.updateDistance(e.getDeltaY());
|
//view3D.updateDistance(e.getDeltaY());
|
||||||
|
if (e.getDeltaY() > 0) {
|
||||||
|
view3D.zoomIn();
|
||||||
|
} else {
|
||||||
|
view3D.zoomOut();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bind zooming to keypress (Z/X default)
|
// Bind zooming to keypress (Z/X default)
|
||||||
|
|||||||
@@ -270,6 +270,8 @@ public class View3D extends Pane {
|
|||||||
if (target.get() == null){
|
if (target.get() == null){
|
||||||
if (newDistance > MAX_ZOOM_LIMIT) {
|
if (newDistance > MAX_ZOOM_LIMIT) {
|
||||||
setDistance(MAX_ZOOM_LIMIT);
|
setDistance(MAX_ZOOM_LIMIT);
|
||||||
|
} else if (newDistance <= ZOOM_IN_LIMIT) {
|
||||||
|
setDistance(ZOOM_IN_LIMIT);
|
||||||
} else {
|
} else {
|
||||||
setDistance(newDistance);
|
setDistance(newDistance);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user