You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -154,6 +156,48 @@ function startUpdatingState(): void {
154
156
}
155
157
hoveredId=undefined;
156
158
});
159
+
160
+
consttheme=getTheme();
161
+
162
+
// the default values of each option are outlined below:
163
+
constdefaults={
164
+
menuRadius: function(){return50;},// the outer radius (node center to the end of the menu) in pixels. It is added to the rendered size of the node. Can either be a number or function as in the example.
165
+
selector: 'node[taskRunName]',// elements matching this Cytoscape.js selector will trigger cxtmenus
166
+
commands: [// an array of commands to list in the menu or a function that returns the array
167
+
168
+
{// example command
169
+
// fillColor: 'rgba(200, 200, 200, 0.75)', // optional: custom background color for item
170
+
content: 'Show logs',// html/text content to be displayed in the menu
171
+
contentStyle: {},// css key:value pairs to set the command's css in js if you want
172
+
select: function(ele){// a function to execute when the command is selected
173
+
console.error(ele.data().taskRunName)// `ele` holds the reference to the active element
174
+
vscode.postMessage({
175
+
type: 'showTaskLog',
176
+
body: ele.data().taskRunName
177
+
});
178
+
},
179
+
enabled: true// whether the command is selectable
180
+
}
181
+
182
+
],// function( ele ){ return [ /*...*/ ] }, // a function that returns commands or a promise of commands
183
+
fillColor: theme.menuBackgroundColor,//'rgba(0, 0, 0, 0.75)', // the background colour of the menu
184
+
activeFillColor: theme.menuSelectionColor,//'rgba(1, 105, 217, 0.75)', // the colour used to indicate the selected command
185
+
activePadding: 0,// additional size in pixels for the active command
186
+
indicatorSize: 24,// the size in pixels of the pointer to the active command, will default to the node size if the node size is smaller than the indicator size,
187
+
separatorWidth: 3,// the empty spacing in pixels between successive commands
188
+
spotlightPadding: 4,// extra spacing in pixels between the element and the spotlight
189
+
adaptativeNodeSpotlightRadius: true,// specify whether the spotlight radius should adapt to the node size
190
+
minSpotlightRadius: 24,// the minimum radius in pixels of the spotlight (ignored for the node if adaptativeNodeSpotlightRadius is enabled but still used for the edge & background)
191
+
maxSpotlightRadius: 38,// the maximum radius in pixels of the spotlight (ignored for the node if adaptativeNodeSpotlightRadius is enabled but still used for the edge & background)
192
+
openMenuEvents: 'cxttapstart taphold',// space-separated cytoscape events that will open the menu; only `cxttapstart` and/or `taphold` work here
193
+
itemColor: 'white',// the colour of text in the command's content
194
+
itemTextShadowColor: 'transparent',// the text shadow colour of the command's content
195
+
zIndex: 9999,// the z-index of the ui div
196
+
atMouse: false,// draw menu at mouse position
197
+
outsideMenuCancel: 2// if set to a number, this will cancel the command if the pointer is released outside of the spotlight, padded by the number given
0 commit comments