// //TODO move this to platform specific operation
//#if UNITY_EDITOR
// public bool HandleKeyEvent(Event evt, ModifierKeyState keyStates)
// {
// var bindings = InvertGraphEditor.KeyBindings;
// foreach (var keyBinding in bindings)
// {
// if (keyBinding.Key != evt.keyCode)
// {
// continue;
// }
// if (keyBinding.RequireAlt && !keyStates.Alt)
// {
// continue;
// }
// if (keyBinding.RequireShift && !keyStates.Shift)
// {
// continue;
// }
// if (keyBinding.RequireControl && !keyStates.Ctrl)
// {
// continue;
// }
// var command = keyBinding.Command;
// if (command != null)
// {
// if (command.CanExecute(InvertGraphEditor.DesignerWindow) == null)
// {
// InvertGraphEditor.ExecuteCommand(command);
// }
// else
// {
// return false;
// }
// return true;
// }
// return false;
// }
// return false;
// }
//#endif
public override void OnMouseDoubleClick(MouseEvent mouseEvent)
{
DiagramViewModel.LastMouseEvent = mouseEvent;
if (DrawersAtMouse == null)
{
DrawersAtMouse = GetDrawersAtPosition(this, mouseEvent.MousePosition).ToArray();
}
base.OnMouseDoubleClick(mouseEvent);
if (DrawersAtMouse.Length < 1)
{
if (mouseEvent.ModifierKeyStates.Alt)
{
// DiagramViewModel.ShowContainerDebug();
}
else
{
DiagramViewModel.ShowQuickAdd();
}
return;
}
if (!BubbleEvent(d => d.OnMouseDoubleClick(mouseEvent), mouseEvent))
{
return;
}
else
{
}
DiagramViewModel.Navigate();
Refresh((IPlatformDrawer)InvertGraphEditor.PlatformDrawer);
//Refresh((IPlatformDrawer)InvertGraphEditor.PlatformDrawer);
}