#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 = this.attachShadow({mode: 'open'});
|
||||||
this._shadowRoot.appendChild(template.content.cloneNode(true));
|
this._shadowRoot.appendChild(template.content.cloneNode(true));
|
||||||
this._workarea = document.getElementById('workarea');
|
this._workarea = document.getElementById('workarea');
|
||||||
this._svgEditor = document.getElementById('svg_editor');
|
|
||||||
this.$dialog = this._shadowRoot.querySelector('#cmenu_canvas');
|
this.$dialog = this._shadowRoot.querySelector('#cmenu_canvas');
|
||||||
this.$copyLink = this._shadowRoot.querySelector('#se-copy');
|
this.$copyLink = this._shadowRoot.querySelector('#se-copy');
|
||||||
this.$cutLink = this._shadowRoot.querySelector('#se-cut');
|
this.$cutLink = this._shadowRoot.querySelector('#se-cut');
|
||||||
|
@ -159,8 +158,6 @@ export class SeCMenuDialog extends HTMLElement {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
attributeChangedCallback (name, oldValue, newValue) {
|
attributeChangedCallback (name, oldValue, newValue) {
|
||||||
console.log('name =', name);
|
|
||||||
// if (oldValue === newValue) return;
|
|
||||||
let eles = [];
|
let eles = [];
|
||||||
const sdowRoot = this._shadowRoot;
|
const sdowRoot = this._shadowRoot;
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
@ -177,7 +174,6 @@ export class SeCMenuDialog extends HTMLElement {
|
||||||
eles.forEach(function (ele) {
|
eles.forEach(function (ele) {
|
||||||
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
||||||
selEle.parentElement.classList.remove('disabled');
|
selEle.parentElement.classList.remove('disabled');
|
||||||
console.log('enable --> ' + ele);
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'disablemenuitems':
|
case 'disablemenuitems':
|
||||||
|
@ -185,7 +181,6 @@ export class SeCMenuDialog extends HTMLElement {
|
||||||
eles.forEach(function (ele) {
|
eles.forEach(function (ele) {
|
||||||
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
const selEle = sdowRoot.querySelector('a[href*="' + ele + '"]');
|
||||||
selEle.parentElement.classList.add('disabled');
|
selEle.parentElement.classList.add('disabled');
|
||||||
console.log('disabled --> ' + ele);
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -253,11 +248,9 @@ export class SeCMenuDialog extends HTMLElement {
|
||||||
const onMenuCloseHandler = (e) => {
|
const onMenuCloseHandler = (e) => {
|
||||||
if (e.button !== 2) {
|
if (e.button !== 2) {
|
||||||
current.$dialog.style.display = 'none';
|
current.$dialog.style.display = 'none';
|
||||||
console.log('onMenuCloseHandler');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const onMenuClickHandler = (e, action) => {
|
const onMenuClickHandler = (e, action) => {
|
||||||
console.log('action ------> ', action);
|
|
||||||
const triggerEvent = new CustomEvent('change', {detail: {
|
const triggerEvent = new CustomEvent('change', {detail: {
|
||||||
trigger: action
|
trigger: action
|
||||||
}});
|
}});
|
||||||
|
|
|
@ -1119,66 +1119,3 @@ ul li.current {
|
||||||
background: #B0B0B0;
|
background: #B0B0B0;
|
||||||
border: 1px solid #000;
|
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