How to use the ember-drag-drop/components/draggable-object.extend function in ember-drag-drop

To help you get started, we’ve selected a few ember-drag-drop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost-Admin / app / components / gh-token-input / tag-token.js View on Github external
import DraggableObject from 'ember-drag-drop/components/draggable-object';
import {computed} from '@ember/object';
import {readOnly} from '@ember/object/computed';

export default DraggableObject.extend({

    attributeBindings: ['title'],
    classNames: ['tag-token'],
    classNameBindings: [
        'internal:tag-token--internal'
    ],

    internal: readOnly('content.isInternal'),

    primary: computed('idx', 'internal', function () {
        return !this.internal && this.idx === 0;
    }),

    title: computed('internal', function () {
        return this.internal ? 'Internal tag' : '';
    })

ember-drag-drop

The default blueprint for Embroider v2 addons.

MIT
Latest version published 22 days ago

Package Health Score

73 / 100
Full package analysis