mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: update image builder to support board selection style
This commit is contained in:
parent
833a6cd95f
commit
585e71aa9d
@ -34,6 +34,8 @@ class ImageNodeWidget extends StatefulWidget {
|
||||
|
||||
class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
||||
with SelectableMixin {
|
||||
RenderBox get _renderBox => context.findRenderObject() as RenderBox;
|
||||
|
||||
final _imageKey = GlobalKey();
|
||||
|
||||
double? _imageWidth;
|
||||
@ -76,6 +78,12 @@ class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get shouldCursorBlink => false;
|
||||
|
||||
@override
|
||||
CursorStyle get cursorStyle => CursorStyle.borderLine;
|
||||
|
||||
@override
|
||||
Position start() {
|
||||
return Position(path: widget.node.path, offset: 0);
|
||||
@ -93,7 +101,8 @@ class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
||||
|
||||
@override
|
||||
Rect? getCursorRectInPosition(Position position) {
|
||||
return null;
|
||||
final size = _renderBox.size;
|
||||
return Rect.fromLTWH(-size.width / 2.0, 0, size.width, size.height);
|
||||
}
|
||||
|
||||
@override
|
||||
|
Loading…
Reference in New Issue
Block a user