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>
|
class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
||||||
with SelectableMixin {
|
with SelectableMixin {
|
||||||
|
RenderBox get _renderBox => context.findRenderObject() as RenderBox;
|
||||||
|
|
||||||
final _imageKey = GlobalKey();
|
final _imageKey = GlobalKey();
|
||||||
|
|
||||||
double? _imageWidth;
|
double? _imageWidth;
|
||||||
@ -76,6 +78,12 @@ class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get shouldCursorBlink => false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
CursorStyle get cursorStyle => CursorStyle.borderLine;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Position start() {
|
Position start() {
|
||||||
return Position(path: widget.node.path, offset: 0);
|
return Position(path: widget.node.path, offset: 0);
|
||||||
@ -93,7 +101,8 @@ class _ImageNodeWidgetState extends State<ImageNodeWidget>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Rect? getCursorRectInPosition(Position position) {
|
Rect? getCursorRectInPosition(Position position) {
|
||||||
return null;
|
final size = _renderBox.size;
|
||||||
|
return Rect.fromLTWH(-size.width / 2.0, 0, size.width, size.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user