How to stop brush drag when mouse leaves the chart area - echarts

The issue is this:
left-click in the chart area and HOLD the left button
now the brush-drag is active: we can move the mouse around and the area will follow
but when we exit the chart area (e.g. far to the right on the grey area) and then release the mouse button (still on the grey area), the brush-drag mode gets stuck
what I mean is, when you now move the mouse back to the chart area, the brush-drag is still active: i.e. the mouse move will resize the brush area although the left-mouse button is NOT pressed down anymore
this will only stop when you make another click inside the chart area
How can we avoid this?
what I want to happen is that the brush area just selects all the data (until the border of the chart) and then stops: i.e. it should do the same as when I release the mouse button in the chart
So I thought I can just send a mouseup event when the mouse leaves the chart area - but this does not work
I also did not find a suitable action in the echart-docs
Here is a full jsfiddle example and the mouseup event that I tried to send:
const mouseUpEvent = new MouseEvent('mouseup');
var echartsDom = myChart.getDom();
var canceled = echartsDom.dispatchEvent(mouseUpEvent);

This was a bug echarts#10675 that has been fixed in version 4.5.0

Related

How can I implement the native macOS screenshot mouse behavior?

I'm implementing a screenshotting app that captures a portion of the screen. I'm currently:
listening for a keyboard shortcut
drawing a transparent view on top of the entire screen
having the user click and drag to select an area inside of that view
screenshotting the coordinates inside of that bounding area.
Here's an example of what it looks like (the transparent view is tinted blue):
This works, but it causes the mouse to stop focusing on whatever it was previously focusing on. In other words, if I'm hovering over a tooltip and I hit the screenshot shortcut, the tooltip vanishes before I have a chance to screenshot it.
It looks like macOS's own screenshot command does not have this problem. If I hover over a date in StackOverflow in order to see the time tooltip, I can press Cmd+Shift+4 and screenshot it pretty easily:
If I try and do the same thing with my own code, the tooltip vanishes after I render my transparent view, even if I haven't moved my mouse.
Is Apple doing something specific to maintain the focus state of the mouse that I could be doing? Alternatively, should I somehow take advantage of Apple's own screenshotting flow myself inside of this app? If it helps, I'm currently using CGWindowListCreateImage to actually take the screenshot.

Microsoft Access Combo Box Arrow Hidden Rectangle Reappears

I have a combo box on a continuous form. I don't want the arrow on the combo box to show unless the record is being changed. I accomplished this by placing a rectangle over the combo box arrow. This works great because it hides the arrow until the record is clicked, then the arrow shows.
The problem is that if you save the form design, close the form, and then open the form, the arrow will reappear and "stick" as you mouse over it. See image below.
The strange thing is that if you open the form, go into design view, and then go back to form view, it no longer "sticks".
Has anyone else had this problem, and if so have you found a work-around?
I did more testing and it turns out there was a little "sliver" of the combobox arrow button peaking out from behind the rectangle. When I expanded the rectangle to cover the entire arrow button, I no longer experienced this problem.

How to drag / re-center the displayed Tableau worksheet?

Suppose I wish to focus on the state of Colorado in the following chloropeth map:
The typical mechanism is to use the operating-system dependent means of dragging the picture. I am on OS/X so that involves using two fingers to drag the image to the desired new centering location.
However the actual result of that operation is a bounding box is displayed on the image (I can not get a screenshot of it since it disappears)
So then .. how to drag /re-center the Tableau display?
Click onto the small 'play' arrow button on the chart menu in the top left hand corner. A sub menu will pop up where you can select the scroll method you'd like - click and drag is one of these. You can also disable this through the chart options (the small drop down menu on the top right hand corner of the chart).

Button with lost focus using PerspectiveTrasnform

Well, I make a Pane based on an example of JavaFX samples (Display Shelf), I put Panes with Labels, Buttons, ComboBox, TableView where's the ImageView. It is working, when I click on Pane, it does the animation correctly, but the buttons that I put in vertical on Right of Pane, receive the focus out of where they are. When I move the mouse button, nothing happens, but if I move the mouse to down of it, I can click in the button that so reveice the focus. The local where I have to move the mouse to button to receive the focus is increasingly far (down) if the button is below the other.
I'm using the Perspective Transform of JavaEX and all is in JavaFX Samples, just changed some params of size (width and height). This effect may be interfering in focus? Or can be another problem? If anyone already had this problem please help me. Thanks.

GWT DnD: Keep draggable within an AbsolutePanel

I made a MultiSlider widget using the GWT and the gwt-dnd addon to rate texts. On the screenshot, you can see the slider button with value 50 dragged outside the slider bar. It can't be dropped outside the bar, but it can be dragged outside of it.
alt text http://lt3.hogent.be/hendi_docs/stackoverflow/gwt-dnd-multislider.png
Is there a way in GWT to always keep the slider buttons inside the slider bar?
EDIT:
The slider bar is an AbsolutePanel, and it is also the only droptarget for the slider buttons. The slider bar panel is also the boundary panel for the drop controller. Dropping outside of the bar panel is not possible, but dragging is.
Now what I really like to know is if it's possible to keep the mouse pointer on the bar panel. If a button is dragged out of it, it will remain on its old position when dropped (so that's OK). Is it possible to allow only vertical DRAGGING? Can the mouse position be set while dragging?
I've used dragController.setConstrainWidgetToBoundaryPanel(true), and I think dragController.setBehaviorConstrainedToBoundaryPanel(true) does the same thing. For more information, check out the javadoc for your version.
The method you're looking for is defined in AbstractDragController with this signature;
void setBehaviorConstrainedToBoundaryPanel(boolean constrainedToBoundaryPanel);
The boundary panel (often passed in in the first parameter to the drag controller constructor) in this case should be an AbsolutePanel which wraps the slider.
It may also be helpful to visualize the absolute panel if things are not working as expected:
absolutePanel.getElement().getStyle().setProperty("border", "1px dashed red");