diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index f985bbc6290..51c9f29fa92 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -523,6 +523,21 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref p_event) xform.set_origin(base_control->get_size() / 2 + panning); xform.set_scale(Vector2(editor_zoom_widget->get_zoom(), editor_zoom_widget->get_zoom())); + Ref pan_gesture = p_event; + if (pan_gesture.is_valid()) { + panning += pan_gesture->get_delta() * 8; + drag_last_pos = Vector2(); + button_center_view->set_disabled(panning.is_zero_approx()); + accept_event(); + } + + Ref magnify_gesture = p_event; + if (magnify_gesture.is_valid()) { + editor_zoom_widget->set_zoom(editor_zoom_widget->get_zoom() * magnify_gesture->get_factor()); + _zoom_changed(); + accept_event(); + } + Ref mm = p_event; if (mm.is_valid()) { if (drag_type == DRAG_TYPE_DRAG_POINT) {