Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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' : '';
})
dragStart(dragged){
this.set('tree.dragged', unwrapper(dragged));
return false;
}
}