#cmenu_canvas unwanted code removed
parent
60e37a7d66
commit
0bb94c3304
|
@ -130,7 +130,6 @@ export class SeCMenuDialog extends HTMLElement {
|
|||
this._shadowRoot = this.attachShadow({mode: 'open'});
|
||||
this._shadowRoot.appendChild(template.content.cloneNode(true));
|
||||
this._workarea = document.getElementById('workarea');
|
||||
this._svgEditor = document.getElementById('svg_editor');
|
||||
this.$dialog = this._shadowRoot.querySelector('#cmenu_canvas');
|
||||
this.$copyLink = this._shadowRoot.querySelector('#se-copy');
|
||||
this.$cutLink = this._shadowRoot.querySelector('#se-cut');
|
||||
|
@ -159,8 +158,6 @@ export class SeCMenuDialog extends HTMLElement {
|
|||
* @returns {void}
|
||||
*/
|
||||
attributeChangedCallback (name, oldValue, newValue) {
|
||||
console.log('name =', name);
|
||||
// if (oldValue === newValue) return;
|
||||
let eles = [];
|
||||
const sdowRoot = this._shadowRoot;
|
||||
switch (name) {
|
||||
|
@ -177,7 +174,6 @@ export class SeCMenuDialog extends HTMLElement {
|
|||
eles.forEach(function (ele) {
|
||||
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
||||
selEle.parentElement.classList.remove('disabled');
|
||||
console.log('enable --> ' + ele);
|
||||
});
|
||||
break;
|
||||
case 'disablemenuitems':
|
||||
|
@ -185,7 +181,6 @@ export class SeCMenuDialog extends HTMLElement {
|
|||
eles.forEach(function (ele) {
|
||||
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
||||
selEle.parentElement.classList.add('disabled');
|
||||
console.log('disabled --> ' + ele);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
@ -253,11 +248,9 @@ export class SeCMenuDialog extends HTMLElement {
|
|||
const onMenuCloseHandler = (e) => {
|
||||
if (e.button !== 2) {
|
||||
current.$dialog.style.display = 'none';
|
||||
console.log('onMenuCloseHandler');
|
||||
}
|
||||
};
|
||||
const onMenuClickHandler = (e, action) => {
|
||||
console.log('action ------> ', action);
|
||||
const triggerEvent = new CustomEvent('change', {detail: {
|
||||
trigger: action
|
||||
}});
|
||||
|
|
|
@ -1119,66 +1119,3 @@ ul li.current {
|
|||
background: #B0B0B0;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
/* Generic context menu styles */
|
||||
.contextMenu {
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
border: solid 1px rgba(0,0,0,.33);
|
||||
background: rgba(255,255,255,.95);
|
||||
padding: 5px 0;
|
||||
margin: 0px;
|
||||
display: none;
|
||||
font: 12px/15px Lucida Sans, Helvetica, Verdana, sans-serif;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-moz-box-shadow: 2px 5px 10px rgba(0,0,0,.3);
|
||||
-webkit-box-shadow: 2px 5px 10px rgba(0,0,0,.3);
|
||||
box-shadow: 2px 5px 10px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.contextMenu LI {
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.contextMenu .shortcut {
|
||||
width: 115px;
|
||||
text-align:right;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.contextMenu A {
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
color: #222;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
background-position: 6px center;
|
||||
background-repeat: no-repeat;
|
||||
outline: none;
|
||||
padding: 0px 15px 1px 20px;
|
||||
}
|
||||
|
||||
.contextMenu LI.hover A {
|
||||
background-color: #2e5dea;
|
||||
color: white;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.contextMenu LI.disabled A {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.contextMenu LI.hover.disabled A {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.contextMenu LI.separator {
|
||||
border-top: solid 1px #E3E3E3;
|
||||
padding-top: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue