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

  • Home
  • SEARCH
  • 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 8559173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:58:46+00:00 2026-06-11T15:58:46+00:00

I find myself in a rather tenuous situation where I’m developing a web application

  • 0

I find myself in a rather tenuous situation where I’m developing a web application with an interface almost entirely expressed using RaphaelJS as a front end for SVG, but don’t have access to the target system (don’t get me started). The target system is an Asus Slate device running Windows 7, and it is touchscreen enabled.

My understanding was that Raphael’s drag support would automatically include simple touch events — so that the touchscreen would automatically behave like a mouse. However, the draggable elements become uninteractive on the slate. I have tried using Raphael’s touchstart, touchend, and touchmove events with the same functions I’m passing to drag, as follows:

var element = canvas.circle( canvas.cwidth / 2, canvas.cheight / 2, 100 ).attr( { fill: 'red', stroke: 'black', 'stroke-width': 5, cursor: 'move' } );

var startDrag = function( x, y )
{
    console.log("starting drag" );
    element.attr( { 'fill-opacity': 0.5 } );
};
var endDrag = function( x, y )
{
    console.log("stopping drag" );
    element.animate( { transform: "T0,0", fill: 'red', 'fill-opacity': 1 }, 1000, 'bounce' );
};
var continueDrag = function( dx, dy, x, y )
{        
    var r = Math.sqrt( dx * dx + dy * dy ) / ( canvas.cwidth / 2 ) * 255;
    var g = x / canvas.cwidth * 255;
    var b = y / canvas.cheight * 255;
    element.transform( [ "T", dx, dy ] );
    element.attr( 'fill', Raphael.rgb( r, g, b ) );
};

element.touchstart( startDrag );
element.touchend( endDrag );
element.touchmove( continueDrag );
element.drag( continueDrag, startDrag, endDrag );

Unfortunately, this has no effect at all.

Can anyone offer me any useful device that doesn’t include flying down to Texas to gain development access to the target device?

  • 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-06-11T15:58:47+00:00Added an answer on June 11, 2026 at 3:58 pm

    Well this works on a PlayBook and it does not require using the touch events other than for equivalent of a click event

    /* Set up generic drag */   
    var start=function() {
        this.data("oldt", this.transform());                 
    }, move = function(dx, dy) {
        // Set up reluctance:- only move if changed by at least 25 pixels
        if (dx>=25 || dy>=25){
            this.attr("fill","blue");
            this.transform(this.data("oldt") + "T" + dx + "," + dy);
            this.data("move", "T" + dx + "," + dy);
        }}, up = function() {
            this.attr("fill","green")   
        };  
        var box = canvas.rect(150,50,100,100).attr("fill", "white");
        box.drag(move,start,up);
        box.touchstart(function(){
        this.attr("fill","red");
    });
    

    If the box is dragged it turns blue and green when released. If touched then it turns red until it is moved. The reluctance reduces sensitivity to movement so that a touch event is not changed into a drag by small movements. See this thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find myself using the 'pattern' below rather unsettlingly often, when I want to
I find myself typing import numpy as np almost every single time I fire
I find myself using Resharper's convert to auto property refactoring a lot to remove
I find myself using this method a ton to perform actions based on a
Here's my situation: I taught myself C++ (albeit rather badly), and was later taught
Using a proprietary framework, I am frequently finding myself in the situation where I
I'm rather new to Maven and I often find myself wanting to see what's
I have a database which manages login information for an application, and find myself
At times I find myself editing the XML files on Qt creator rather than
My SQL skills are rather limited and since I find myself working with a

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.