Mum4d

Member

Last active 5 years ago

  1. 5 years ago
    Thu Nov 15 16:04:46 2018
    Mum4d posted in PinchGesture help needed.

    Another related question. Is there a way for the pinch/zoom to take it's centre reference point from the area the user is touching rather than just zooming from the image centre point? So the user can pinch on a specific area of an image and zoom in on that specific area. At the moment if I want to zoom into the top right of an image I have to zoom a bit, them move the image over, then zoom bit more, and so on. I'd also like to be able to reset the image scale and position back to default when closing the window. At the moment it maintains the zoomed / moved data.

    Also, can you recommend a good source for code examples so I can learn and try to work things out myself rather than keep asking here. I have no experience in app programming whatsoever, I just have some javascript/jquery HTML knowledge. There are things i'd like to do in my app but don't know where to begin and as helpful as the Creolabs site is, there is not enough code examples for a novice like me

  2. Tue Nov 13 13:02:12 2018
    Mum4d posted in PinchGesture help needed.

    Thank you very much Marco

  3. Tue Nov 13 11:49:12 2018
    Mum4d posted in PinchGesture help needed.

    Sure,

    Thanks Marco, Really appreciated

    The basic concept is the first page shows a list of golf clubs that have special offers (list from MySQL). click on a club name to show an image of their offer in a new window. I want the user to be able to zoom in on the image to read the text of the offer.

  4. Tue Nov 13 10:16:58 2018
    Mum4d posted in PinchGesture help needed.

    Still getting the same error. Would it be because the image is placed on the page from a URL in a MySQL database (not an Asset) ??

  5. Tue Nov 13 09:40:45 2018
    Mum4d started the conversation PinchGesture help needed.

    Hi all, I'm very new to Creo, Gravity and programming in general so please excuse my ignorance! I'd like to apply the ability to zoom in and out of an image and I'm guessing I use the PinchGesture. I found an example in this forum but I cannot get it to work? I get the error "Runtime Error Unable to find size into class CREORectAction (PinchGesture1)" on my iPhone.
    I have "User Interaction" checked and my pinchGesture code is...

    if ( self.state == GestureRecognizerState.Began) {    //initial frame 
    	ImageView1.refFrame = ImageView1.frame ;
    	return ;
    }
    
    if (self.state == GestureRecognizerState.Ended) {   //final frame
    	var r = ImageView1.refFrame.copy();
    	r.size.width *= self.scale;
    	r.size.height *= self.scale;
    	r.origin.x -= (r.size.width - ImageView1.refFrame.size.width) / 2;
    	r.origin.y -= (r.size.height - ImageView1.refFrame.size.height) / 2;
    	ImageView1.frame = r;
    }

    Any help would be really appreciated
    Thanks

  6. Tue Nov 13 09:23:45 2018
    Mum4d joined the forum.