DmitryBaranovskiy / raphael

JavaScript Vector Library
https://dmitrybaranovskiy.github.io/raphael/
MIT License
11.27k stars 1.67k forks source link

.path() #1078

Closed lkcode666666 closed 7 years ago

lkcode666666 commented 7 years ago

I'm sorry to add an issue but i don't how to do it~ when I use .path() I know it works when it looks like this: .path('M 10,10 L 20,20); but in my js file,I set

var a=10;
blah.path('M a,10 L 20,20');

it doesn't work though i USE " ,it doesn't work too! do you have some good ideas?

DmitryBaranovskiy commented 7 years ago
var a=10;
blah.path('M ' + a + ',10 L 20,20');
GoToLoop commented 7 years ago
let a = 10;
blah.path(`M ${a},10 L 20,20`);

https://developer.Mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

lkcode666666 commented 7 years ago
Thank for you your help! I'm so happy that it works ! : )

At 2017-03-09 16:25:56, "Dmitry Baranovskiy" notifications@github.com wrote:

var a=10; blah.path('M '+ a +',10 L 20,20);

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.