raphael

Is there any tooltip functionality in Graphiti?

蹲街弑〆低调 提交于 2019-12-13 02:43:25
问题 Is there any tooltip functionality, so that on mouse over of any shape(node) it will appear showing the information for the shape. Thanks in advance:) 回答1: Yes, this functionality is now available: http://draw2d.org/draw2d_touch/jsdoc/#!/example/tooltip_diy 来源: https://stackoverflow.com/questions/12387256/is-there-any-tooltip-functionality-in-graphiti

Delay between opacity: 0 and starting animation to opacity: 1 in Raphael JS

為{幸葍}努か 提交于 2019-12-13 02:33:35
问题 I am using Raphael JS library and here is my code: var rectangle = paper.rect(0, 0, 5, 5); rectangle.attr({opacity: 0}); // I need here a 5 seconds delay, before starting an animation rectangle.animate({opacity: 1}, 2000); I have tried rectangle.attr({opacity: 0}).delay(5000); and also this: rectangle.attr({opacity: 0}, 5000); , but none of these seems to work at all. What is the simplest way to wait some time before excuting other code. I would not like to use nested functions or for loops

Striped oval using SVG

拟墨画扇 提交于 2019-12-13 02:18:36
问题 I have built a bordered and striped oval in CSS, and I would like to do something similar with SVG. I'm completely new to SVG, and I've tried using Raphael. This is as far as I got (see fiddle here): var paper = Raphael(150, 150, 320, 320); var oval = paper.rect(0, 0, 100, 50, 25); oval.attr('fill', 'crimson'); oval.attr('stroke', 'transparent'); How can I do stripes with SVG, in a similar vein to the CSS? 回答1: Raphael doesn't appear to support patterns but it does support linear gradients as

How can I put custom image in wheelnav.js

我们两清 提交于 2019-12-13 02:14:23
问题 I'm using wheelnav.js plugin of javascript to draw some circular menu as in the image below: The problem is that I can't put an image inside the menu parts and I don't know how to do it. If anyone knows how to put some custom images inside each of this menu parts please help me... Thanks!!! 回答1: UPDATE May 3, 2016: To insert images into the menu slices, use imgsrc:path/filename . So the code above can be changed to: var imgWheel = new wheelnav("divId"); imgWheel.createWheel(["imgsrc:img/menu1

How to pass special characters to javascript window.open in URL using paper.add method?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:04:28
问题 paper.add([{ type: "text", x: 340 + textLength + 28, y: 410, text: "4860", fill: "blue", href:"javascript:window.open('https://planning.partners.com/ep/#Create Campaign&CId=4860');void(0)" } ]).attr({ 'font-size': 14, "font-family": "Segoe UI", "text-decoration": "underline", 'text-anchor': "start" }); The above code is rendering the text (4860) fine and showing the hyperlink. But when i am clicking on the hyperlink, the window is opening with the URL "https://planning.partners.com/ep/". The

Where does come the offset in Raphael javascript

时光毁灭记忆、已成空白 提交于 2019-12-13 01:26:48
问题 I really like the Raphael Javascript library which is very useful for handling SVG with javascript. However there is an offset value which is added to the generated svg code that I don't understand. Does anybody know where does it come from and how to avoid it? Here is my JS code: var paper = Raphael("canvas", 510, 510); paper.clear(); paper.rect(0, 0, 500, 500, 10).attr({fill: "#fff", stroke: "black"}); The generated SVG code is <div id="canvas"> <svg width="510" height="510"> <desc>Created

The onclick method gets executed when I am declaring it

假装没事ソ 提交于 2019-12-12 23:34:12
问题 I am trying to declare an onclick method that will call a function that clears and rebuilds the display showing more detail on the item that was clicked. The problem is the onclick method I am trying to assign gets executed when I assign it so all I see is the detail view of one of the items. If you remove the i.node.onclick line you see 5 randomly placed items that you can hover over but not click on. HTML <html> <head> <title>Raphael Play</title> <script type="text/javascript" src="Raphael

How to extract data from an embed Raphael dataset to CSV?

前提是你 提交于 2019-12-12 19:17:03
问题 Attempting to extract the data from this Google Politics Insights webpage from "Jan-2012 to the Present" for Mitt Romney and Barack Obama for the following datasets: Search Trends Based on volume Google News Mentions Mentions in articles and blog posts YouTube Video Views Views from candidate channels For visual example, here's what I mean: Using Firebug I was able to figure out the data is stored in a format readable by Raphael 2.1.0; looked at the dataset and nothing strikes me as a simple

Raphael JS becomes really slow when using background on a lot of rectangles

和自甴很熟 提交于 2019-12-12 18:28:46
问题 I have a big set of small rectangles (4K-5K) and I want to use the sprite technique to give them the background, so I have only one image (otherwise the number of requests would kill the server). If I give them a coloured background, the map takes only a few seconds to build. I tried to create a rect, apply a translation to it to get a different part of the background image assigned and that works. But when I add even only 10 of them it is incredibly slow. Am I doing something wrong? 回答1: I

clip-path in Raphaël.js

非 Y 不嫁゛ 提交于 2019-12-12 11:24:21
问题 How can I use clip-path with Raphaël.js like this example. It seams that Raphael.js has only clip-rect in it. 回答1: You can cut a hole through a path drawn shape. This is a technique known as donut holes and you can see an example on my index page If this looks difficult it is not See the information database and the technique labelled donut holes My site index is http://www.irunmywebsite.com/ Err it used to be. Now you can find a multiple clip path (Imagine seeing a view through several holes