I have a Vega-Lite chart, multi-layered with point and rule marks. Here is the configuration in Vega Editor. To enable selection of points, zoom and panning on this chart, it has two selections named – select and zoom. Pointer click and drag is configured for selecting points Shift + mouse wheel is for zoom Shift + pointer drag is for
Tag: selection
Excel Add-in: How to create a range?
I am writing an Excel add-in in JavaScript. What I need to do is find the currently selected cell, then create a range object that is 4 columns wide and X rows high, with the selected cell at the top left of the selection. I know how to find the currently selected cell, but I don’t know how to either
Reacting to selection changes in an HTML textarea
How can I get, for an HTML textarea element, called back on all selection changes to the text edited therein? (I am currently using the hack of combining keyup, keypress, and mousemove (for dragging selection endpoint), and maybe more could be added, but this is not exactly elegant.) I can’t find it in HTML documentation or on Stack Overflow. By ‘all
How can I get a list of all values in select box?
I am stumped. I have a form with a dropdown list, and I would like to grab a list of all the values in the list. I pulled the below example from w3 schools (yes, I know it’s unreliable, but other solutions on stack overflow seem to be very similar to this). It was not working for me, and I
Get selection from Google Docs
Is there a way around the fact that does not seem to work in Google Docs? I want to capture text from a highlighted selection from Google Docs. My implementation is with Chrome Extensions, but that is not as relevant as the fact that window.getSelection() doesn’t seem to work there (though it does elsewhere). Thanks! Answer As mentioned on Docs
Keep the selection in a textarea
Can I prevent the loss of selection in the “onblur” event? Answer I don’t think that’s a good idea. A user with mouse in his/her hand can click anywhere on the page. If you get him/her back into the textarea, it won’t be following the principles of web accessibility.