Last active
July 10, 2016 06:31
-
-
Save alagiz/c9ea34b2fda66ec120d6d47b7f689b81 to your computer and use it in GitHub Desktop.
zoom-out
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
zoomOut(targetRouteName){ | |
var page = Ember.$("#page").get(0); | |
var screenWidth = Ember.$(window).width(); | |
var screenHeight = Ember.$(window).height(); | |
var transformLeft = screenWidth / 4; | |
var transformTop = screenHeight / 4; | |
page.style.transformOrigin = "0 0"; | |
page.style.transition = "transform " + 1000 + "ms ease"; | |
page.style.transform = "matrix(" + 0.3 + ",0,0," + 0.3 + ",+" + transformLeft + ",+" + transformTop + ")"; | |
Ember.run.later(() => { | |
this.transitionToRoute(targetRouteName); | |
}, 1000); | |
} | |
} | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
redirect: function() { | |
this.transitionTo('foo.bar'); | |
} | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
zoomOut(){ | |
this.sendAction('zoomOut', this.get('targetRoute')); | |
} | |
} | |
}); |
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
import Ember from 'ember'; | |
import config from './config/environment'; | |
var Router = Ember.Router.extend({ | |
location: config.locationType | |
}); | |
Router.map(function() { | |
this.route('foo', function() { | |
this.route('bar', function() {}); | |
this.route('bar2', function() {}); | |
}); | |
}); | |
export default Router; |
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; | |
} | |
.square{ | |
border-radius: 0; | |
border:solid 11px #f00; | |
width:150px; | |
height:150px; | |
line-height:120px; | |
display:inline-block; | |
} | |
.text { | |
margin-left:30px; | |
} |
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.10.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.6.0", | |
"ember-data": "2.6.1", | |
"ember-template-compiler": "2.6.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment