Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing outside window#521 #646

Merged
merged 14 commits into from
Mar 27, 2024
8 changes: 8 additions & 0 deletions app/lib/views/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/foundation.dart' as foundation;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foundation is already imported in line 9, just use kIsWeb.


import '../api/intent.dart';
import '../services/import.dart';
Expand Down Expand Up @@ -349,6 +350,13 @@ class _MainViewViewportState extends State<MainViewViewport>
.onPointerHover(event, getEventContext());
},
onPointerMove: (PointerMoveEvent event) async {
RenderObject? box = context.findRenderObject();
//!
if (!box!.paintBounds
.contains(event.localPosition) &&
foundation.kIsWeb) {
return;
}
cubit.updateLastPosition(event.localPosition);
if (cubit.state.moveEnabled &&
event.kind != PointerDeviceKind.stylus) {
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ packages:
dependency: transitive
description:
name: bloc
sha256: f53a110e3b48dcd78136c10daa5d51512443cea5e1348c9d80a320095fa2db9e
sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e"
url: "https://pub.dev"
source: hosted
version: "8.1.3"
version: "8.1.4"
bloc_concurrency:
dependency: "direct main"
description:
Expand Down
8 changes: 4 additions & 4 deletions tools/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ packages:
dependency: transitive
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.10.0"
path:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.8.3"
source_span:
dependency: transitive
description:
Expand Down