-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hover message for glyph decorations are not displayed #292
Comments
Hm, I could get it working: var jsCode = [
'"use strict";',
'function Person(age) {',
' if (age) {',
' this.age = age;',
' }',
'}',
'Person.prototype.getAge = function () {',
' return this.age;',
'};'
].join('\n');
var editor = monaco.editor.create(document.getElementById("container"), {
value: jsCode,
language: "javascript",
glyphMargin: true
});
var decorations = editor.deltaDecorations([], [
{
range: new monaco.Range(3,1,3,10),
options: {
className: 'myContentClass',
glyphMarginClassName: 'myGlyphMarginClass',
glyphMarginHoverMessage: 'glyph margin hover message'
}
}
]); |
There is no |
Indeed, looks like microsoft/vscode@51f2d53 didn't adopt |
FYI i don't see the hover message after making the noted modification to the noted example. 0.11.1, on any of firefox 59.0.2, chrome 65.0.3325.181, or electron 1.8.4 |
@starpit The following code works for me. var jsCode = [
'"use strict";',
'function Person(age) {',
' if (age) {',
' this.age = age;',
' }',
'}',
'Person.prototype.getAge = function () {',
' return this.age;',
'};'
].join('\n');
var editor = monaco.editor.create(document.getElementById("container"), {
value: jsCode,
language: "javascript",
glyphMargin: true
});
var decorations = editor.deltaDecorations([], [
{
range: new monaco.Range(3,1,3,1),
options: {
isWholeLine: true,
className: 'myContentClass',
glyphMarginClassName: 'myGlyphMarginClass',
glyphMarginHoverMessage: { value: 'glyph margin hover message' }
}
}
]); |
ah, thank you @rcjsuen the key difference from the comments above is in
compared to the above
which does not work |
@starpit Correct. The API has changed so you need to use |
I have
glyphMargin
enabled and generally it looks good but hover messages are not displayed. You can easily reproduce it in the playground.The text was updated successfully, but these errors were encountered: