Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose size and fix symbol resize issue #147

Merged

Conversation

susonthapa
Copy link
Contributor

What has changed?

  • Changed the resize function on the native side to fix the weird sizing issue.
  • Added a new symbolImageSize attribute to control the size from the JS side.

Solution Description

This builds on top of #146.

CarPlay has the following recommendation for the symbol size.
image

However, I wasn't able to achieve the inline Symbol and Instruction(the first one) design by using the primary and secondary resize options. So, I have exposed a new attribute symbolImageSize to set the image size. This allows for finer control from the JS side. The calculation for the image size happens on the JS side and takes the scale of the CarPlay window and the image into account.

Demo

Previous Implementation

SCR-20231008-kbgx

New Implementation

Symbol Image and Instruction in one line
SCR-20231008-kfmm
Symbol Image and Instruction on separate line
SCR-20231008-kgdr

@birkir birkir merged commit f2653d2 into birkir:master Oct 13, 2023
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants