Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show context menu on responsive web when button clicked. not by right click event nodecontextmenu #61

Open
xellos00 opened this issue Jul 8, 2019 · 2 comments
Assignees

Comments

@xellos00
Copy link

xellos00 commented Jul 8, 2019

No description provided.

@xellos00 xellos00 changed the title contextmenu show context menu on responsive web when button clicked. not by right click event nodecontextmenu Jul 8, 2019
@xellos00
Copy link
Author

xellos00 commented Jul 8, 2019

I am trying to use this tree, but I tried to show contextMenu when it has click side icon that I gave it.
right click to open context menu is working properly, but when I clicked bar to open context menu is not working. do you have any idea with it?

<template slot="sidebar" slot-scope="{ node }">
    <span class="visible-icon" style="padding:0px 3px 0px 10px; cursor:pointer" @click="event => showContextEllipsis(event, node)">
              <i  class="fa fa-ellipsis-v"></i>
            </span>
</template>

showContextEllipsis(event, node) {
this.showContextMenu(node, event, 'clicked')
},

showContextMenu(node, event, type) {
event.preventDefault();
this.contextMenuIsVisible = true;
const $contextMenu = this.$refs.contextmenu;
console.log('X: ' + event.clientX+ ' :Y: '+ event.clientY);
this.$refs.slVueTree.select(node.path);
$contextMenu.style.left = event.clientX + 'px';
$contextMenu.style.top = event.clientY + 'px';
},

@holiber holiber self-assigned this Jul 17, 2019
@xellos00
Copy link
Author

Dun worry, I figured out, I was kinda stupid with this. haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants