-
Notifications
You must be signed in to change notification settings - Fork 817
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
feat(SebmGoogleMap): support draggable map option #556
Conversation
Simple enough ... looks good |
@@ -79,6 +79,11 @@ export class SebmGoogleMap implements OnChanges, OnInit { | |||
zoom: number = 8; | |||
|
|||
/** | |||
* Enables/disables if map is draggable. | |||
*/ | |||
draggable: boolean = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attribute name looks good, but the name of the input should be mapDraggable (as we don't want to remap native DOM properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this example in the marker: https://github.com/SebastianM/angular2-google-maps/blob/master/src/core/directives/google-map-marker.ts#L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh right, the dom draggable attribute. If someone wants to allow a user to drag a map around on the screen. Good Catch.
http://www.w3schools.com/tags/att_global_draggable.asp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. so you can have translation on inputs like this?
'draggable: mapDraggable'
mapDraggable would be mapped to the property draggable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the template would look like this:
<sebm-gogle-map [mapDraggable]="false"></sebm-google-map>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@josx thanks! Please address the comments and I'm happy to merge it. |
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
Signed-off-by: José Luis Di Biase <[email protected]>
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
… DOM remapping Signed-off-by: José Luis Di Biase <[email protected]>
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
Thanks, merged! |
Adding draggable option on map directive.
BTW I need it in my project to no let the user drag on the map.