Skip to content

Commit

Permalink
Add support for horizontalDoubleArrow and verticalDoubleArrow cursors (
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolkert authored Jun 10, 2020
1 parent e4f8dbc commit 7e6c856
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/web_ui/lib/src/engine/mouse_cursor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class MouseCursor {
'forbidden': 'not-allowed',
'grab': 'grab',
'grabbing': 'grabbing',
'horizontalDoubleArrow': 'ew-resize',
'verticalDoubleArrow': 'ns-resize',
};
static String _mapKindToCssValue(String kind) {
return _kindToCssValueMap[kind] ?? 'default';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ private PointerIcon resolveSystemCursor(@NonNull String kind) {
// "forbidden": default
put("grab", Integer.valueOf(PointerIcon.TYPE_GRAB));
put("grabbing", Integer.valueOf(PointerIcon.TYPE_GRABBING));
put(
"horizontalDoubleArrow",
Integer.valueOf(PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW));
put("verticalDoubleArrow", Integer.valueOf(PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW));
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
return [NSCursor openHandCursor];
else if ([kind isEqualToString:@"grabbing"])
return [NSCursor closedHandCursor];
else if ([kind isEqualToString:@"horizontalDoubleArrow"])
return [NSCursor resizeLeftRightCursor];
else if ([kind isEqualToString:@"verticalDoubleArrow"])
return [NSCursor resizeUpDownCursor];
else
return [NSCursor arrowCursor];
}
Expand Down

0 comments on commit 7e6c856

Please sign in to comment.