mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-24 09:38:25 +00:00
feat: update image builder to support board selection style
This commit is contained in:
parent
833a6cd95f
commit
585e71aa9d
1 changed files with 10 additions and 1 deletions
|
|
@ -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 a new issue