Skip to content

Commit

Permalink
updating mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
rodydavis committed Sep 22, 2024
1 parent 077ed24 commit 005b1d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';
import 'dart:ui';

import 'package:collection/collection.dart';
import 'package:flutter/widgets.dart';
Expand All @@ -9,6 +8,8 @@ import '../graph.dart';
import '../node.dart';

mixin JsonInteropMixin<Node extends GraphNode> on Graph<Node> {
JsonEncoder encoder = const JsonEncoder.withIndent(' ');

Map<String, dynamic> nodeToJson(Node node) {
return {
'@id': node.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ mixin MutableGraphMixin<Node extends GraphNode> on BaseGraph<Node> {

void onInteractionStart(ScaleStartDetails event) {
super.onInteractionStart(event);
keyboardFocusNode.requestFocus();
locked.value = true;
final (local, list) = pointDetails(event.localFocalPoint);
batch(() {
Expand Down Expand Up @@ -145,7 +144,6 @@ mixin MutableGraphMixin<Node extends GraphNode> on BaseGraph<Node> {

void onInteractionEnd(ScaleEndDetails event) {
super.onInteractionEnd(event);
keyboardFocusNode.requestFocus();
locked.value = false;
// debugPrint(event.toString());
// mouse.value = null;
Expand Down

0 comments on commit 005b1d2

Please sign in to comment.