Forked from Gaurav0/controllers.application.js
Last active
December 15, 2020 01:58
-
-
Save jacobq/ff9ff22445f6215d4f238f6c35e2d4bc to your computer and use it in GitHub Desktop.
Modal Dialog Test
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 options = {duration: 2000, easing: 'easeInOutQuad'}; | |
export default function(){ | |
this.transition( | |
//this.use('fade') // this works | |
// this has a glitch; can see second copy/ghost of modal in top left when closing | |
this.use('explode', { | |
pick: '.ember-modal-overlay', | |
use: ['fade', options] | |
}, { | |
pick: '.ember-modal-dialog', | |
use: ['fade', options] | |
}) | |
); | |
}; |
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({ | |
appName: 'ember-modal-dialog test', | |
show: false, | |
actions: { | |
toggle() { | |
this.toggleProperty('show'); | |
} | |
} | |
}); |
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
/* Taken from ember-modal-structure.scss */ | |
.ember-modal-dialog { | |
z-index: 51; | |
position: fixed; | |
} | |
.ember-modal-dialog.emd-in-place { | |
position: static; | |
} | |
.ember-modal-wrapper.emd-static.emd-wrapper-target-attachment-center .ember-modal-dialog { | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} | |
.ember-modal-wrapper.emd-animatable.emd-wrapper-target-attachment-center { | |
width: 100vw; | |
height: 100vh; | |
position: fixed; | |
top: 0; | |
left: 0; | |
z-index: 50; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.ember-modal-wrapper.emd-animatable.emd-wrapper-target-attachment-center .ember-modal-overlay { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.ember-modal-wrapper.emd-animatable .ember-modal-dialog { | |
position: relative; | |
} | |
.ember-modal-overlay { | |
width: 100vw; | |
height: 100vh; | |
position: fixed; | |
top: 0; | |
left: 0; | |
z-index: 50; | |
} | |
/* Custom */ | |
.ember-modal-dialog { | |
min-width: 80%; | |
min-height: 25%; | |
/* border: 1px solid black; */ | |
border-radius: 8px; | |
padding: 20px; | |
background-color: white; | |
box-shadow: 0 0 10px #222; | |
} | |
.close-button { | |
} | |
.ember-modal-overlay.translucent { | |
background-color: grey; | |
background-color: rgba(127, 127, 127, 0.75); | |
} |
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", | |
"ENV": { | |
"ember-modal-dialog": { | |
"hasLiquidWormhole": "2.0.5", | |
"hasLiquidTether": "2.0.4", | |
"hasEmberTether": "1.0.0-beta.0" | |
} | |
}, | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js", | |
"ember": "2.12.0", | |
"ember-modal-dialog": "2.2.0", | |
"ember-tether": "1.0.0-beta.0", | |
"liquid-fire": "0.27.3", | |
"liquid-tether": "2.0.4", | |
"liquid-wormhole": "2.0.5" | |
}, | |
"addons": { | |
"liquid-fire": "0.27.3", | |
"liquid-tether": "2.0.4", | |
"liquid-wormhole": "2.0.5", | |
"ember-tether": "1.0.0-beta.0", | |
"ember-modal-dialog": "2.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment