codeEditor cleaned and working

This commit is contained in:
Luis Fernando Molina committed 2019-05-09 09:59:39 +02:00
1 parent 5aff613710
commit bac3f0ac5f
2 files changed
+3 -27

No files matched your search

-27
View File
@@ -36,16 +36,9 @@ function newCodeEditor () {
let isMouseOver = false
let selfMouseOverEventSubscriptionId
let selfMouseClickEventSubscriptionId
let selfMouseNotOverEventSubscriptionId
return thisObject
function finalize () {
thisObject.container.eventHandler.stopListening(selfMouseOverEventSubscriptionId)
thisObject.container.eventHandler.stopListening(selfMouseClickEventSubscriptionId)
thisObject.container.eventHandler.stopListening(selfMouseNotOverEventSubscriptionId)
thisObject.container.finalize()
thisObject.container = undefined
thisObject.iconOK = undefined
@@ -70,10 +63,6 @@ function newCodeEditor () {
}
thisObject.iconOK.src = window.canvasApp.urlPrefix + thisObject.imagePathOK
thisObject.icon = thisObject.iconOK // The default value is ON.
selfMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver)
selfMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick)
selfMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver)
}
function deactivate () {
@@ -137,22 +126,6 @@ function newCodeEditor () {
thisObject.container.frame.position.y = 0
}
function onMouseOver (point) {
if (thisObject.container.frame.isThisPointHere(point, true, false) === true) {
isMouseOver = true
} else {
isMouseOver = false
}
}
function onMouseNotOver (point) {
isMouseOver = false
}
function onMouseClick (event) {
}
function drawBackground () {
if (thisObject.visible === true) {
let position = {
+3
View File
@@ -383,6 +383,9 @@ function newStrategyPart () {
function onNotFocus () {
thisObject.isOnFocus = false
if (thisObject.codeEditor !== undefined) {
thisObject.codeEditor.deactivate()
}
}
function onMouseClick (event) {