mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-05-20 23:06:35 +08:00
Add width/height overrides for NestedArtboardLayout
Adds the ability to override width and height for NestedArtboardLayout. This allows each NestedArtboardLayout instance to respond to be sized differently. This is not supported in the NestedArtboard Node and Leaf types, since those are resized using differently (Node uses scale and Leaf uses a combination of scale/fit/alignment). Implemented via FFI as discussed with @luigi-rosso because NestedArtboardLayout modifying the "taken" layoutNode directly could result in race conditions and other conflicts. https://github.com/user-attachments/assets/c323a94f-f392-4c10-ac01-af112f70a256 Diffs= 0dc0b435f Add width/height overrides for NestedArtboardLayout (#7736) 1131f30e6 refactor conditions (#7747) 35a52873c Fix layout shape hug in CPP (#7770) 949c70600 Add a premake message when Xcode command line tools isn't installed (#7756) 4bf7c7545 add data converter and data types for conversion (#7734) Co-authored-by: Philip Chung <philterdesign@gmail.com>
This commit is contained in:
@ -1 +1 @@
|
||||
1b6afc1e96b6cac3a708b78381ce6fa7d0dd8058
|
||||
0dc0b435ffb0df61de0afcdc2cea0c69bb8fedd4
|
||||
|
@ -58,6 +58,8 @@ abstract class MountedArtboard {
|
||||
double get artboardHeight;
|
||||
double get originalArtboardWidth;
|
||||
double get originalArtboardHeight;
|
||||
void artboardWidthOverride(double width, int widthUnitValue, bool isRow);
|
||||
void artboardHeightOverride(double height, int heightUnitValue, bool isRow);
|
||||
void dispose();
|
||||
void dataContextFromInstance(ViewModelInstance viewModelInstance,
|
||||
DataContext? dataContextValue, bool isRoot);
|
||||
|
@ -87,6 +87,12 @@ class RuntimeMountedArtboard extends MountedArtboard {
|
||||
artboardInstance.height = height;
|
||||
}
|
||||
|
||||
@override
|
||||
void artboardWidthOverride(double width, int widthUnitValue, bool isRow) {}
|
||||
|
||||
@override
|
||||
void artboardHeightOverride(double height, int heightUnitValue, bool isRow) {}
|
||||
|
||||
@override
|
||||
double get originalArtboardWidth => originalArtboardInstanceSize.width;
|
||||
|
||||
|
Reference in New Issue
Block a user