-
Notifications
You must be signed in to change notification settings - Fork 99
PRJ-57 Draw notifications and floating toolbar on top of client markdown/JCEF component #141
base: jcef
Are you sure you want to change the base?
Conversation
| // 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()) |
There was a problem hiding this comment.
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
| CompositeOperationType.DST, | ||
| -> "source-over".also { | ||
| logger.info { "Missing implementation for $this, applying source-over" } | ||
| logger.info { "Missing implementation for $type, applying $it" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
| 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, | ||
| ) | ||
| } |
There was a problem hiding this comment.
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!
| iFrame.addEventListener("load", EventListener { | ||
| setOpenLinksInExternalBrowser(openLinksInExternalBrowser, true) |
There was a problem hiding this comment.
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?
| @SerialName("d") | ||
| FAKE_WINDOW, |
There was a problem hiding this comment.
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
Server changes: JetBrains/projector-server#121