Revamp context menu; Specialist touch menu

This commit is contained in:
James Barnsley
2017-01-29 16:25:05 +13:00
parent 138f2f3f08
commit c108e833dd
14 changed files with 379 additions and 186 deletions

View File

@ -1,13 +1,11 @@
import * as helpers from '../../helpers'
export function showContextMenu( e, data, context = false, trigger = 'click' ){
export function showContextMenu(data){
data.position_x = data.e.clientX
data.position_y = data.e.clientY
return {
type: 'SHOW_CONTEXT_MENU',
position_x: e.clientX,
position_y: e.clientY,
context: context,
trigger: trigger,
data: data
}
}
@ -18,6 +16,19 @@ export function hideContextMenu(){
}
}
export function showTouchContextMenu(data){
return {
type: 'SHOW_TOUCH_CONTEXT_MENU',
data: data
}
}
export function hideTouchContextMenu(){
return {
type: 'HIDE_TOUCH_CONTEXT_MENU'
}
}
export function startSearch( query ){
return {
type: 'SEARCH_STARTED',