Created
          August 2, 2017 05:01 
        
      - 
      
 - 
        
Save ibare/f49faded7e36ecde54af1d52426c65e4 to your computer and use it in GitHub Desktop.  
    bind function
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const myview = Woowahan.View.create('bindExample', { | |
| initialize() { | |
| this.onDragend = this.onDragend.bind(this); | |
| this.super(); | |
| }, | |
| viewDidMount() { | |
| this.map.addListener(markerId, 'dragend', this.onDragend); | |
| }, | |
| onAddressConversion() { | |
| // something | |
| }, | |
| onDragend(event) { | |
| const latitude = event.latLng.lat(); | |
| const longitude = event.latLng.lng(); | |
| this.dispatch(Woowahan.Action.create(GET_ADDRESS_CONVERSION, { | |
| latitude, longitude | |
| }), this.onAddressConversion); | |
| } | |
| }); | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment