Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

PRJ-57 Draw notifications and floating toolbar on top of client markdown/JCEF component #141

Open
wants to merge 7 commits into
base: jcef
Choose a base branch
from

Conversation

ARTI1208
Copy link
Contributor

@ARTI1208 ARTI1208 commented Mar 22, 2022

Comment on lines +53 to +54
// clear canvas so that semi-transparent parts won't stack on top of each other
clearRect(0.0, 0.0, buffer.width.toDouble(), buffer.height.toDouble())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, probably it could be easier to just set https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation to copy. However, firstly https://youtrack.jetbrains.com/issue/PRJ-700 should be resolved

@@ -95,7 +95,7 @@ internal class DomContext2d(private val myContext2d: CanvasRenderingContext2D) :
CompositeOperationType.CLEAR,
CompositeOperationType.DST,
-> "source-over".also {
logger.info { "Missing implementation for $this, applying source-over" }
logger.info { "Missing implementation for $type, applying $it" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Comment on lines +117 to +146
MouseEventInit(
screenX = screenX,
screenY = screenY,
clientX = clientX + iFrame.offsetLeft,
clientY = clientY + iFrame.offsetTop,
button = button,
buttons = buttons,
relatedTarget = relatedTarget,
region = region,
ctrlKey = ctrlKey,
shiftKey = shiftKey,
altKey = altKey,
metaKey = metaKey,
modifierAltGraph = getModifierState("AltGraph"),
modifierCapsLock = getModifierState("CapsLock"),
modifierFn = getModifierState("Fn"),
modifierFnLock = getModifierState("FnLock"),
modifierHyper = getModifierState("Hyper"),
modifierNumLock = getModifierState("NumLock"),
modifierScrollLock = getModifierState("ScrollLock"),
modifierSuper = getModifierState("Super"),
modifierSymbol = getModifierState("Symbol"),
modifierSymbolLock = getModifierState("SymbolLock"),
view = view,
detail = detail,
bubbles = bubbles,
cancelable = cancelable,
composed = composed,
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because of copying object from a different context to make it usable? Let's leave a comment about it!

Comment on lines +50 to +51
iFrame.addEventListener("load", EventListener {
setOpenLinksInExternalBrowser(openLinksInExternalBrowser, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we change onload to load?

Comment on lines +43 to +44
@SerialName("d")
FAKE_WINDOW,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear what's a "fake window". From the other repo, I see it's when it doesn't extend Window, but just heavy-weight component. Let's add a comment at least, or also rename to something like NON_WINDOW_HW_COMPONENT

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants