ui: panning GraphView and resizing after node was moved
This commit is contained in:
@@ -78,6 +78,7 @@ void GraphController::handleMessage(MessageGraphNodeMove* message)
|
||||
if (node)
|
||||
{
|
||||
node->position = message->position;
|
||||
getView()->resizeView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public:
|
||||
std::shared_ptr<Graph> graph, const std::vector<DummyNode>& nodes, const std::vector<DummyEdge>& edges) = 0;
|
||||
virtual void clear() = 0;
|
||||
|
||||
virtual void resizeView() = 0;
|
||||
|
||||
virtual Vec2i getViewSize() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ public:
|
||||
|
||||
virtual Vec2i getPosition() const = 0;
|
||||
virtual bool setPosition(const Vec2i& position) = 0;
|
||||
virtual void moveTo(const Vec2i& position) = 0;
|
||||
|
||||
virtual Vec2i getSize() const = 0;
|
||||
virtual void setSize(const Vec2i& size) = 0;
|
||||
|
||||
Reference in New Issue
Block a user