raphael

RaphaelJS animation loop

纵然是瞬间 提交于 2019-12-25 07:40:13
问题 I need help with adding a loop to my raphaelJS animation. The idea is to hit the button id="1" to rotate the purple square 120degrees. If you hit button id="2", the purple square will rotate 120degrees to the left instead. I've accomplished to add the function which they both rotates, though the problem is that you can only click the order of, button id="1", button ID="2", 1, 2, , 1, 2, etc. To clarify, you can't rotate the blue square twice the same direction, you'll have to alternate

Raphael js not rendering correctly in IE9-Document mode

与世无争的帅哥 提交于 2019-12-25 05:12:50
问题 I'm coding an interactive map with Raphael JS (2.0.1) which is behaving nicely in all browsers except IE9 in document mode. In this case the paths and filles spaces look like this: http://media.apa.at/dev/examples/ie9_problems.png instead of clean white lines. The shapes are created in a loop and scaled and translated afterwards to have the correct size and position: this.scaling = this.mappaper.set(); for (var tEntity in tData) { var tShape = this.mappaper.path(tData[tEntity].path); tShape

How to redraw raphael object after paper.clear()

爷,独闯天下 提交于 2019-12-25 05:08:06
问题 This is my code. i have tried but cant find any answer. so anyone help me move = function (dx, dy) { paper.clear(); this.attr({x: this.ox + dx, y: this.oy + dy}); var arrow = paper.arrow(this.ox,this.oy,this.attrs.x,this.attrs.y,8); } rect2.drag(move, start); 回答1: I don't think you need to be clearing (unless you have a specific reason for doing so...). Raphael isn't like drawing on the html5 canvas; you don't need to clear and redraw everything when you want to animate. Each element within

Convert VML graphic to bitmap on the ASP.NET server

≡放荡痞女 提交于 2019-12-25 04:45:08
问题 I'm using RaphaelJS . The browser renders a chart for me (which is in VML as all my users are on IE). I want the user to be able to save this image and share it normally eg paste into an email, into powerpoint, into a document etc etc. Problem is not many things can render VML. I can easily get the VML markup describing the image back to the server. All I want to do is convert it to some kind of more universal format eg PNG, BMP, GIFF, whatever which I can then allow the user to download. I

Problems converting VML to SVG in .NET

痴心易碎 提交于 2019-12-25 03:58:08
问题 I have a very similar problem as this post; I'm using RaphaelJS to generate a chart, but more specifically in my case I need to print the result. I have used Inkscape's command line utility (it's excellent) to convert Raphael's SVG output to a PNG file, which the user can download and print. The problem is, it works in Firefox etc. but not Internet Explorer. Because IE uses VML, not SVG, Inkscape won't convert it when the user is coming from IE. I have had a look at IECapt which might well

Raphael Js can't fill path with Image

一曲冷凌霜 提交于 2019-12-25 03:56:21
问题 I have been trying to fill up path with image pattern but in vain. I have this fiddle. I am able to fill the object like cirle with image but not any path. Please click on the red area label and click on any path for the action. JS: var paths = { path_1: { name: '1', path: 'M30.848,0.13 45.4,1.747 58.983,1.747 74.829,3.687 90.999,3.687 123.015,3.687 149.21,0.13 176.051,1.908 201.923,3.687 236.526,3.687 268.865,6.598 279.538,6.598 297.647,6.598 316.404,6.598 339.042,3.364 369.765,6.598 391.108

In Raphael or even Generally in SVG, do transforms take less CPU then re-positioning manually?

假如想象 提交于 2019-12-25 01:18:51
问题 I am trying to figure out what are the implications for using transform in raphael vs. actually moving the object manually. For example, here is a circle. circ = Paper.circle(0,0,5) Now I can move the circle in two ways. 1. circ.transform(['t',5,0]) 2. circ.attr("x",5) Is one superior to the other CPU-wise ? Same question with rotation. Here's a rectangle(path): pathRect=paper.path(['m',0,0,'l'10,0,10,10,0,10,'z']) I want to rotate it 45 degrees. I can do it two way: 1. pathRect.transform(['r

Most widely-supported (IE + Opera) JavaScript canvas/drawing library

独自空忆成欢 提交于 2019-12-24 23:48:54
问题 I'm looking to do a portfolio site, and I wanted to do some creative drawing on the website without using images. I considered canvas, which I really think would be cool, plus an interesting project, however, I heard that IE has no compatibility (is that true?) so I cannot have that. Then, I considered Raphaël, which seems like it's the most viable option thus far. Ughh, there was another library that I can't remember the name to, which also seemed like a good option. What do you guys think

Error: <tspan> attribute dy: Expected length, “NaN”. | Error: <path> attribute d: Expected number, “M,0,0”. | Raphael.js | wheelnav.js

我只是一个虾纸丫 提交于 2019-12-24 22:08:19
问题 I am trying to create circular menu with wheelnav.js library. Even though it seems to work I get thousands of errors in chrome console. Error: attribute d: Expected number, "M,0,0". Error: attribute dy: Expected length, "NaN". During my own debugging I managed to find the same causes that people list in these threads: https://github.com/DmitryBaranovskiy/raphael/issues/593 https://github.com/DmitryBaranovskiy/raphael/issues/620 https://github.com/fperucic/treant-js/issues/73 Even though these

kartograph add symbol coordinates

一个人想着一个人 提交于 2019-12-24 21:28:00
问题 I cannot add symbols in my svg map. This is the metadata of my svg: <metadata><views> <view h="720.449987754" padding="0" w="1400"> <proj flip="auto" id="robinson" lon0="-49.8982700875"/> <bbox h="57.01" w="79.24" x="-771.91" y="435.26"/></view></views> </metadata> And this is the js code: var points_of_interest = [ { name: 'Florianopolis', lat: -27.60, lon: -48.55} ]; map.addSymbols({ type: kartograph.LabeledBubble, data: points_of_interest, location: function(d) { return [d.lon, d.lat] },