Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3843312
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:55:11+00:00 2026-05-19T15:55:11+00:00

this is the idea.. i want to put a image… and the user is

  • 0

this is the idea..

i want to put a image… and the user is going to move it, in any part he wants, first i use the image

var R = Raphael("hello_world", 800, 800),
elipse = R.image("mioo.jpg",100,200,100,300);

now the user is going to see the image, with mouse he is going to take it and move it, how do i do it? …

with the last code, it doens’t move, i need it moves.. how do i do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:55:12+00:00Added an answer on May 19, 2026 at 3:55 pm

    Images don’t have cx cy attributes see SVG Specification (Rafael use SVG to render graphics) you must use x and y atributes.

    up = function () {
        // restoring state
        this.attr({opacity: .5});
    };
    var start = function () {
        // storing original coordinates
        this.ox = this.attr("x");
        this.oy = this.attr("y");
        this.attr({opacity: 1});
    },
    move = function (dx, dy) {
        // move will be called with dx and dy
        this.attr({x: this.ox + dx, y: this.oy + dy});
    },
    up = function () {
        // restoring state
        this.attr({opacity: .5});
    };
    

    or use transformations:

    elipse.tx = 0;
    elipse.ty = 0;
    var start = function () {
        this.attr({opacity: 1});
    },
    move = function (dx, dy) {
        //This is quick hack to restore previous position - because translate use 
        //relative transformation
        this.translate(-this.trx, -this.try); 
        this.translate(dx, dy);
        this.tx = dx;
        this.ty = dy;
    },
    up = function () {
        this.attr({opacity: .5});
    };
    elipse.drag(move, start, up);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably crazy. I want to take the idea of Dependency Injection to
I am stuck with borders on my website. I want to put an image
I want to put a background image in may java file from an image
I have this idea for a free backup application. The largest problem I need
I've been sitting on this idea for quite a long time and would like
I am in the middle of developing an application when I had this idea
This helpful idea from Andy Gaskell supports 50% of my next question: I'd like
I have this grand idea to basically employ some brute force attack to test/verify
I have a html like this: The idea is that divs are floated left
I'm try something from this comment idea Code Igniter Controller/Model name conflicts find class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.