raphael

Rapahel Sketchpad not working

半城伤御伤魂 提交于 2019-12-11 19:53:10
问题 Below is my code.I have used raphael sketchpad plugin. But I'm unable to draw,I just get blank sketchpad. Why is it so? <html> <head> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="raphael-min.js"></script> <script type="text/javascript" src="json2.js"></script> <script type="text/javascript" src="raphael.sketchpad.js"></script> <script type="text/javascript"> $(document).ready(function() { var sketchpad = Raphael.sketchpad("editor", { height:

draw line on mouse drag in raphael js

老子叫甜甜 提交于 2019-12-11 19:29:38
问题 This is what I have tried: <!doctype html> <html> <head> <title>Editor</title> <meta http-equiv="x-ua-compatible" content="ie=9"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js"></script> <script type="text/javascript" src="<%=request.getContextPath()%>/connector.js"></script> <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" /> <script type="text

raphael js setViewBox didn't resize my paper

冷暖自知 提交于 2019-12-11 18:59:05
问题 I have a problem with setViewBox on raphael, The paper isn't resized even if I did myPaper.setViewBox(0, 0, new_map_width, new_map_height,true); (Line 9 on the JS code) Nb : new_map_width = 400 and new_map_height=300 and the map is at 800*600 this is my code : http://jsfiddle.net/xperali/zdbzJ/ 回答1: I found the solution, I have to execute my setViewBox method after drawing all the paths, and use some math skills :) var original_width = 777; var original_height = 667; var zoom_width = map

making one side of a path draggable in Raphael 2.0

橙三吉。 提交于 2019-12-11 16:32:18
问题 I am reading a JSON file and foreach element I am creating a path and a circle. I need to make the path drag with the circle. The path terminates at the exact x,y coordinates of the circle center. I only want the circle end of the path to drag with the circle. The other end of the path is fixed. I have drag working for the circles but it is not doing anything for the paths. I have posted code that is dumbed down and does not contain the intelligence for positioning circles. I only need help

Mouseout event not firing in Rafael.js

久未见 提交于 2019-12-11 15:34:09
问题 I have a number of shapes drawn using Raphael.js that I need to add a shadow to and enlarge slightly when the mouse rolls over. I have everything working perfectly in Firefox and Chrome, but in Internet Explorer, the mouseout event doesn't appear to fire. This is the mouseover/mouseout code I have for each hexagon shape (hexagon is a reference to the rafael element, this/_Promise being a reference to a class that defines the events among other things): this.hexagon.mouseover(function(){

IE 9 is not rendering images with Raphael JS library

让人想犯罪 __ 提交于 2019-12-11 15:29:33
问题 I am making a Raphael JS animation, and for some reason, I cannot get images to render in internet explorer 9. here is my code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=9" /> <link type="text/css" rel="stylesheet" href="css/main.css" /> <script type="text/javascript" src="scripts/raphael-min.js"></script> <script type="text/javascript" src="scripts/jquery-1.7.min.js"></script> <script type="text/javascript"> $(document)

raphael.js IE8 and Jquery

不问归期 提交于 2019-12-11 12:13:42
问题 I am creating an anatomic man where the user can rollover muscles, the muscles are highlighted and when clicked they display the name of the muscle. Through a separate JQuery, I have a group of <dl> s that show and hide depending on the muscle group clicked. This works fine in IE9, and other modern browsers, but I am having an issue within IE8. IE8 only wants to use the code within the generated raphael.js. So I need to move the jquery into raphael…which I'm sure will be a more elegant way of

Raphael drawing. Circle with two sectors from different images

北城余情 提交于 2019-12-11 11:44:06
问题 How to draw circle filled by image and how to draw the sector of such circle? Is it possible to animate drawing sector (for example animate it's size by increasing angle)? What if I want to draw first sector from @image1@ and another sector from @image2@? 回答1: To draw a circle filled by image you... simply draw the circle and fill it with an image :D var c = paper.circle(200, 200, 40); c.attr({fill:"url(http://path_to_the_image.png)"}); About drawing a sector I think that you actually have to

How do I add custom HTML in Rally sdk 2.0?

家住魔仙堡 提交于 2019-12-11 10:52:07
问题 I'm creating an app with some custom gauges using Rally SDK 2.0. This requires some custom HTML. I took a rake-compiled app.html file from the examples as a starting point. Using JustGage for my gauges. Here is my launch function. launch: function () { var info = this.getStoriesForProject(); //Gets some aggregate info $('#header label').html(info.Title); var g = new JustGage({ id: "devgauge", value: info.DevPercent, levelColors: ['#f80404', '#f8f804', '#50ed0e'], min: 0, max: 100, title: "Dev

How can I stop elements overlapping using JavaScript and the Raphael JavaScript library

好久不见. 提交于 2019-12-11 10:05:54
问题 I’m generating multiple, random sized, circular elements using the Raphael JavaScript library but because it’s random a lot of the circular elements being generate overlap or cover each other. What I wanted to know, is there any way with JavaScript to tell if one element is in already in particular position so to avoid the overlapping? Essentially, I want to create random elements on a canvas, of a random size that don’t overlap or cover each other. There's a couple of test files I created