Skip to content

Commit c69c020

Browse files
committed
Rows and columns keep ignorePointer, keepAspect and floating
_copyRowState (rows and columns made from type row/column) dropped them, so an overlay column blocked taps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019VxYXVqDCpkLKzm2thjx6E
1 parent 00ea390 commit c69c020

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎lib/src/api/nodes/row_column_node.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ void _copyRowState(RowColumnNode source, RowColumnNode target) {
342342
target.componentVersion = source.componentVersion;
343343
target.componentSchema = source.componentSchema;
344344
target.squeezable = source.squeezable;
345+
target.ignorePointer = source.ignorePointer;
346+
target.keepAspect = source.keepAspect;
347+
target.floating = source.floating;
345348
target.widthFactor = source.widthFactor;
346349
target.heightFactor = source.heightFactor;
347350
target.interactionStates = source.interactionStates;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:codelessly_api/codelessly_api.dart';
2+
import 'package:test/test.dart';
3+
4+
void main() {
5+
test('a row or column made from type row/column keeps ignorePointer, keepAspect and floating', () {
6+
for (final String type in <String>['row', 'column']) {
7+
final BaseNode? node = NodeJsonConverter().fromJson(<String, dynamic>{
8+
'type': type,
9+
'id': 'n',
10+
'name': 'Layer',
11+
'basicBoxLocal': <double>[0, 0, 100, 100],
12+
'ignorePointer': true,
13+
'keepAspect': 1.5,
14+
'floating': true,
15+
});
16+
expect(node, isA<RowColumnNode>());
17+
expect(node!.ignorePointer, isTrue, reason: type);
18+
expect(node.keepAspect, 1.5, reason: type);
19+
expect(node.floating, isTrue, reason: type);
20+
expect(node.toJson()['ignorePointer'], isTrue, reason: type);
21+
}
22+
});
23+
}

0 commit comments

Comments
 (0)