Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Component.extend({
model: null,
}).reopenClass({
positionalParams: ['model'],
});
import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
});
@megganeturner
megganeturner / components.drop-down.js
Last active January 25, 2018 03:52
Dropdown Component
import Ember from 'ember';
export default Ember.Component.extend({
options: null,
isActive: false,
activeOption: '',
isTouchScreenDevice: Ember.computed(function() {
return navigator.maxTouchPoints || 'ontouchstart' in document.documentElement;
}),
@megganeturner
megganeturner / readme.md
Last active February 16, 2022 08:54
FEWD Project Ideas

Alum projects:

FEWDr29 projects

Live Site Github Link (check out the code!)
@megganeturner
megganeturner / components.pop-up.js
Last active April 27, 2018 04:53
dropdown action
import Ember from 'ember';
export default Ember.Component.extend({
dropdownVisible: false,
isLoading: null,
dropdownClass: Ember.computed('dropdownVisible', function p () {
const visible = this.get('dropdownVisible');
return visible ? 'visible' : 'hidden';
import Ember from 'ember';
export default Ember.Component.extend({
});
@megganeturner
megganeturner / components.image-crop.js
Last active August 9, 2018 01:43
Canvas Image Crop
import Ember from 'ember';
import { computed, observer } from '@ember/object';
import { on } from '@ember/object/evented';
export default Ember.Component.extend({
tagName: 'canvas',
attributeBindings: ['width', 'height'],
width: 500,
height: 300,
import Ember from 'ember';
import { computed, observer } from '@ember/object';
import { on } from '@ember/object/evented';
export default Ember.Component.extend({
scale: 0.4,
click: false,
baseX: 0,
baseY: 0,
lastPointX: 0,
@megganeturner
megganeturner / components.image-cropper.js
Last active November 26, 2018 05:38
image upload demo
import Ember from 'ember';
import { computed, observer } from '@ember/object';
import { on } from '@ember/object/evented';
export default Ember.Component.extend({
scale: 0.4,
click: false,
baseX: 0,
baseY: 0,
lastPointX: 0,