Last active
October 11, 2017 18:38
-
-
Save olejorgensen/b2539a3471a9c541ceb0c9a1e3240764 to your computer and use it in GitHub Desktop.
New Twiddle
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
export default Ember.Controller.extend({ | |
center: L.latLng(56, 10.3), | |
zoom: 7, | |
statusText: Ember.computed('center', function() { | |
var c = this.get('center'); | |
return c ? `${c.lat}, ${c.lng}` : ''; | |
}), | |
actions: { | |
onLoad(e) { | |
var c = this.get('center'); | |
e.target.setView(c, 5); | |
}, | |
updateCenter(e) { | |
this.set('center', e.target.getCenter()); | |
} | |
} | |
}); |
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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.leaflet-container { | |
background-color: #deedff; | |
width: 100%; | |
height: 700px; | |
font-family: inherit; | |
} |
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
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-leaflet": "3.0.10" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment