diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-08 17:10:44 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-09 01:38:20 -0800 |
commit | e0f98704061f6e1b3b078da468baea37851391b5 (patch) | |
tree | 421404274580ebf71e186780068b62f40953fec6 /platform/darwin/docs | |
parent | a5e43f027297f8f5b83304a02354c2d3f75d0bc7 (diff) | |
download | qtlocation-mapboxgl-e0f98704061f6e1b3b078da468baea37851391b5.tar.gz |
[macos] Flip offsets and translations
The screen origin is at the lower-left, so offsets and translations increase rightwards and upwards, in contrast to iOS and Web contexts, where the coordinate system increases rightwards and downwards. Duplicated style layer property declarations to reflect this difference.
Diffstat (limited to 'platform/darwin/docs')
-rw-r--r-- | platform/darwin/docs/guides/For Style Authors.md.ejs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index 2fcf5704a4..6d1e11c7c5 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -286,6 +286,14 @@ For padding attributes, note that the arguments to `EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise order, in contrast to the clockwise order defined by the style specification. +<% if (macOS) { -%> +Additionally, on macOS, a screen coordinate of (0, 0) is located at the +lower-left corner of the screen. Therefore, a positive `CGVector.dy` means an +offset or translation upward, while a negative `CGVector.dy` means an offset or +translation downward. This is the reverse of how `CGVector` is interpreted on +iOS. + +<% } -%> ## Filtering sources You can filter a shape or vector source by setting the |