react-data-menu
Version:
Smart data-driven menu rendered in an overlay
53 lines • 1.59 kB
JavaScript
export default class CircleMenuItems {
constructor(binder) {
return [{
type: 'label',
title: 'Circle options:'
}, '-', {
title: 'Position',
items: [{
title: 'X coordinate',
items: [{
title: 'Move left',
persist: true,
callback: binder('decrease-x')
}, {
title: 'Move right',
persist: true,
callback: binder('increase-x')
}]
}, {
title: 'Y coordinate',
items: [{
title: 'Move up',
persist: true,
callback: binder('decrease-y')
}, {
title: 'Move down',
persist: true,
callback: binder('increase-y')
}]
}]
}, {
title: 'Radius',
items: [{
title: 'Increase',
persist: true,
callback: binder('increase-r')
}, {
title: 'Decrease',
persist: true,
callback: binder('decrease-r')
}]
}, '-', {
title: 'Bring to front',
callback: binder('bring-to-front')
}, {
title: 'Send to back',
callback: binder('send-to-back')
}, '-', {
title: 'Remove',
callback: binder('remove-circle')
}];
}
}