mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: unable to resize the image (#4750)
This commit is contained in:
parent
74233d2606
commit
f36ca3777b
@ -118,7 +118,8 @@ class _ImageAlignButtonState extends State<_ImageAlignButton> {
|
||||
canTap: (details) => false,
|
||||
);
|
||||
|
||||
String get align => widget.node.attributes['align'] ?? 'center';
|
||||
String get align =>
|
||||
widget.node.attributes[ImageBlockKeys.align] ?? centerAlignmentKey;
|
||||
final popoverController = PopoverController();
|
||||
late final EditorState editorState;
|
||||
|
||||
@ -188,11 +189,11 @@ class _ImageAlignButtonState extends State<_ImageAlignButton> {
|
||||
|
||||
FlowySvgData iconFor(String alignment) {
|
||||
switch (alignment) {
|
||||
case 'right':
|
||||
case rightAlignmentKey:
|
||||
return FlowySvgs.align_right_s;
|
||||
case 'center':
|
||||
case centerAlignmentKey:
|
||||
return FlowySvgs.align_center_s;
|
||||
case 'left':
|
||||
case leftAlignmentKey:
|
||||
default:
|
||||
return FlowySvgs.align_left_s;
|
||||
}
|
||||
|
@ -93,9 +93,9 @@ class _ResizableImageState extends State<ResizableImage> {
|
||||
return _buildLoading(context);
|
||||
}
|
||||
|
||||
_cacheImage ??= FlowyNetworkImage(
|
||||
_cacheImage = FlowyNetworkImage(
|
||||
url: widget.src,
|
||||
width: widget.width,
|
||||
width: imageWidth - moveDistance,
|
||||
userProfilePB: _userProfilePB,
|
||||
errorWidgetBuilder: (context, url, error) =>
|
||||
_buildError(context, error),
|
||||
|
Loading…
Reference in New Issue
Block a user