Skip to content

Instantly share code, notes, and snippets.

@jamesarosen
Created December 14, 2016 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesarosen/0f84d0d0665587d0625e41277c6d9c19 to your computer and use it in GitHub Desktop.
Save jamesarosen/0f84d0d0665587d0625e41277c6d9c19 to your computer and use it in GitHub Desktop.
tether-dialog-constraints
import Ember from 'ember';
export default Ember.Controller.extend();
<h1>Modal Dialog Constraints</h1>
<h2 id='without-constraints'>Without Constraints</h2>
{{#tether-dialog
attachment='top left'
offset='-6px 0'
target='#without-constraints'
targetAttachment='bottom left'}}
<p>This content appears within a tether-dialog without constraints</p>
{{/tether-dialog}}
<p>
Yes, absolutely, I do indeed concur, wholeheartedly! Computer, lights up! Besides, you look good in a dress. They were just sucked into space. Maybe we better talk out here; the observation lounge has turned into a swamp. We could cause a diplomatic crisis. Take the ship into the Neutral Zone When has justice ever been as simple as a rule book? I'll alert the crew. Mr. Crusher, ready a collision course with the Borg ship. Fate protects fools, little children and ships named Enterprise. Your head is not an artifact! Could someone survive inside a transporter buffer for 75 years? I think you've let your personal feelings cloud your judgement. I can't. As much as I care about you, my first duty is to the ship. I will obey your orders. I will serve this ship as First Officer. And in an attack against the Enterprise, I will die with this crew. But I will not break my oath of loyalty to Starfleet.
</p>
<h2 id='with-constraints'>With Constraints</h2>
{{#tether-dialog
attachment='top left'
constraints=(hash to='scrollParent' attachment='together')
offset='-6px 0'
target='#without-constraints'
targetAttachment='bottom left'}}
<p>This content appears within a tether-dialog without constraints</p>
{{/tether-dialog}}
<p>
Maybe if we felt any human loss as keenly as we feel one of those close to us, human history would be far less bloody. We know you're dealing in stolen ore. But I wanna talk about the assassination attempt on Lieutenant Worf. Mr. Worf, you do remember how to fire phasers? I think you've let your personal feelings cloud your judgement. We have a saboteur aboard. I'm afraid I still don't understand, sir. and attack the Romulans. You bet I'm agitated! I may be surrounded by insanity, but I am not insane. Computer, belay that order. The unexpected is our normal routine. Wouldn't that bring about chaos? Your shields were failing, sir.
</p>
{
"version": "0.10.6",
"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.9.0",
"ember-data": "2.9.0",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {
"ember-modal-dialog": "0.9.0",
"ember-tether": "0.3.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment