Do exist any ways to avoid handling events on empty space like border radius? - react-native

I attached screenshot, there you can see arrow on circle View component where I was clicking. Problem is that onPress event is calling when I press there. Do exist any ways to avoid handling events on these places, just circle should handle events, probably we should in some way disable disable that handling or use some additional tools which can solve this issue.

You can use the Pan Responder to detect the x,y coordinate where the click is happening and calculate if the touch where within the circle. Will be pretty straight forward. Read more here.

react-native-svg helped me to solve it

Related

How to click through elements?

I have two shape at same position, not same color, and when i click over them, i want to fire click event on both, not just the first.
These two shapes are in the same container.
I have tried getObjectsUnderPoint() under stage.on("mousemove"), but this function increase my FPS (60 to 32~, and inside there are just a console.log), So it's not a good solution.
I tried the bubble, the useCapture, but i think it isn't what i want.
I just want to fire click on all element behind my mouse.
If someone have a solution, please.
There are a few points here:
EaselJS objects sort of work like HTML DOM Elements. If an element has a mouse handler on it it will block objects in other hierarchies below it from receiving the event. This is just how it works. The main difference is that if you don't have mouse events, then they are just ignored (like if you set the pointerEvents on an HTML element to none to have the mouse ignore it).
Your idea with getObjectsUnderPoint is what I would have recommended. Running any hit-test logic on mousemove is going to be expensive (mousemove fires a LOT, which is why we give the ability to throttle the typical mouseover check if you enableMouseOver on the stage).
A few things to optimize it:
Ensure you are using mode=2 on your getObjectsUnderPoint, which will only check objects with mouse listeners. This greatly reduces the overhead in checking. [docs]
Instead of checking the stage on your own mousemove event, set a flag to check it on tick. This throttles it to your Ticker FPS at least. You could also set an interval to check it even less often. It can create a little bit of a visible lag, but you can probably find a nice balance.
Reduce what is checked. If you have a container with your clickable elements in it, you can only check that object for mouse interaction.
If your objects are the exact same, you can also just trigger the click manually on the second item.
obj1.on("click", function(event) {
obj2.dispatchEvent(event);
});
I hope those approaches provide you a solution. Let me know if you have follow-up questions.
Cheers,

How to listen active dragging event of an UWP UIElement?

How to track/listen active dragging event of UI Element in UWP. I added the flat CanDrag=true to enable the drag feature. Using the DragStarting and DragLeave can identify the start and end of drag. But want to get the X,Y coordinate of the UIElement on dragging. Any recommendation to achieve that? I dont want to use RenderTransform for this.
I don't think it's possible in standard Drag'n'Drop flow.
There're few options but they look like a crutch.
You may use manipulations and subscribe to Delta event. That's where RenderTransform comes in.
You may start some time loop and get visual position each frame. (The most crutchy idea)
Try to play wih IsHitTestVisible and subscribe to PointMove of some FrameworkElement behind.
Subscribe to PointEntered and PointExited to the elements you dragging over so they could fire events.
I prefer the first one. It's simple and it's plane.

Intercept wxListCtrl scroll events

I'm using wxWidgets 2.8 on a Linux box.
I'd like to get notifications of scroll events from wxListCtrl (or wxListView). Basically I want to be notified when someone uses the scrollbars.
I tried with EVT_SCROLLWIN and EVT_SCROLL without success.
Can someone provide me some sample code?
Unfortunately I cannot find any documentation/sample about this topic. Any pointer?
I need to intercept this event because I'm using a wxListView under MOTIF (sic) and when I scroll the list, the new items are not redrawn (basically I see the list empty until I click an item). So, my hack would be to call wxWindow::Redraw() after a scroll.
Any alternative solution to my original problem?
Thanks.
You won't get scroll events for what can be (even if it is not in wxGTK, actually) a native control, this is just not something that wxWidgets guarantees because it is very difficult (and maybe impossible) to implement in general.
Sorry.

iOS horizontal swipe room selection

I am making an iOS app for remote controlling the lights in my house. I have a list of groups of bulbs (rooms) that can be turned on and off. My problem is selecting a room, I want it to be like this:
You can either press the arrows left or right to switch the room, or you can put your finger, where it says Living Room and swipe left or right to switch it.
Can someone give me a pointer as how to implement a swipe feature like that? I know there are gesture recognizers. I never used them, but I guess they won't automatically make the text I want to swipe follow my finger.
I guess it would be possible to use the gesture recognizer and manually move the text to get the swipe "feeling". It just seems to me like there should be an easier solution.
I've done something similar several times, and the most elementary way to approach it is to override the touches... methods on NSResponder. This will tell you when a user's finger touches the component, when it moves, and when they let go. From that, it's pretty easy to adjust the position of your UIView, do some custom rendering, or whatever else you need.
Another, higher-level, approach is to use a UIScrollView and implement it's delegate methods. Inside the scroll view are three elements which completely fill the viewport: the one you can see, and those to the left and right. You watch the delegate events for the user adjusting the position of the viewport and as they expose an element to the left or right, you can snap the viewport into place when they let go. Then, you adjust the three inner views to show the appropriate new content and reset the viewport to expose the middle element (which would then be showing the appropriate content).
There are undoubtedly many other approaches, but I've used both of these with good effect.
I solved it in the end by using a pangesturerecgonizer attached to the label. It's pretty straight forward, I just didn't know pan is supposed to mean something like drag and drop, I thought pan would be something completely different.

Blender points moving each other

I am making a model of a boat in Blender. However, whenever I try to move just one point, all of the points near it are moving too. What setting do I need to change to fix this?
BTW, Whenever I click one point, a circle appears around where I clicked, and stays put, does this have anything to do with my problem?
I have tried
Selecting and deselecting all points
Restarting Blender
Comparing my sidebar to a project that doesn't act this way
None of these worked. As I am still relatively new to Blender I have no Idea what the any of the real functions are or how to change them so any answer needs to be simplified to near caveman level.
Thanks
there is a icon, on the right side of the selection of vertex, edge, faces.. called Proportional editing. Press O to toggle it.
Make sure this is disabled.