I know I can just hide the zoom buttons, but users would still be able to zoom with their mouse wheel. Maybe something along the lines of:
svgEditor.setConfig({
enableZoom: false
});
Thanks in advance for your help.
There's no built-in way to disable zoom and from what I can tell no easy way to override it with an extension so the quickest way to accomplish what you're trying to do is probably find where the zoom function is defined and return early.
So open {svg-edit folder}\svg-editor.js and find
var zoomChanged = svgCanvas.zoomChanged = function
It's on line #794 for me. After the curly brace just add "return false" and then users won't be able to zoom at all.
Also, what do you mean "users would still be able to zoom with their mouse wheel"? Mouse wheel just scrolls vertically as with any other webpage for me.
Related
I've searched all the settings and Google but can find nothing. It seems such an obvious feature. If I use the arrow keys to scroll vertically through the code, I quickly end up with the cursor at the top or bottom of the screen whereas I really want to be doing my editing near the centre of the screen, which means I have to do two operations: scroll the code to where I want it and then move the cursor.
What I want is to hit a shortcut (e.g. the Scroll Lock key) and then when I press up- or down-arrow the cursor stays where it is (relative to the screen) and the code scrolls past it.
I've read that some tools allow you to set the number of "always visible" lines above and below the cursor which would do the job, but I can't find that in Rider either.
Am I missing something obvious, or is there an add-in or something I can customize to get what I want?
Found it! There are Move Up and Scroll and Move Down and Scroll actions in the keymap settings. Assign hotkeys to them (weren't assigned in my config) and it will work like you described it.
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
I have a UIMenuController which I have added a few extra items to. I would like the menu to be BELOW the text that I select, so I tried:
[UIMenuController sharedMenuController].arrowDirection = UIMenuControllerArrowDown;
That seemed to do nothing, and everything I try, won't put the menu below the text.
How can I do that?
According to the docs, arrowDirection sets the direction the arrow points; it has nothing to do with the location of the menu relative to its target area. It also looks like they don't give you any control over the positioning of the menu beyond setTargetRect:inView.
If you really want to put the menu below the text, you might be able to set a "fake" target area and change the arrow direction to point to the "real" area of interest.
However, there's probably a reason Apple does it this way. My guess? If you select some text with your finger, your hand is probably obscuring the part of the screen below the text... so it's not very helpful if the menu appears there. Going out of your way to break consistency with standard UI conventions isn't usually worth the effort.
I am looking for a specific custom control. I am drawing some rectangles to my picture box, now I would like to display a tooltip when someone moves his mouse to one of the rectangles, so a hover rectangle-hover event. Does this sound doable at all? If yes, is there anyone that has made such a control already? If no, how would I go about making my own? Thanks!
Have a look at this. You can do some really cool things with this free tooltip library:
http://www.tooltips.net
You can also try the ToolTip Class in Windows Forms.
Is there a way to change the orientation of the iPhone using a button?
No. flip the phone, the orientation changes. Leave it at that, or you'll ruin the integrity of the phone.
sometimes we need to show our app in the correct orientation, even if there is not direct way on doing what domness want, you can look at this SO entry and see some responses.
P.S. # domness, try to search for what you need before posting a new question.
What exactly are you trying to reorient? You can change the position of the status bar with UIApplication -setStatusBarOrientation:animated:; rearrange your UI with the proper transformations and you'll pretty much have it.
You can force an orientation change, but only using an unsupported, private API. If this is something you'd like Apple to make public, you should file an enhancement request.
This is my new account btw..
Right, I got this sorted by apply the transformations to what I wanted to show when the button was clicked. It was to show a scrollview with applied animations to objects within the scroll view.