Raphael-Radar icon indicating copy to clipboard operation
Raphael-Radar copied to clipboard

Hello,how to set Raphael-Radar size?

Open Coca-code opened this issue 8 years ago • 3 comments

Hello,I have run it successful, but I can not set it's size. It's width is 250px; height is 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you.

========================================

显示以下内容的翻译: Hello,I have run it successful, but I can not set it's size. Its width is 250px; height in 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you. 仍然翻译: Hello,I have run it successful, but I can not set it's size. It's width is 250px; height is 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you. こんにちは、私はそれが成功し実行してきたが、私はそれがサイズだ設定することはできません。その幅が250ピクセルです。 250ピクセルで高さ。私は「レム」単位を使用したいと思います。どのように私は'Htmlの\ CSS\ jsファイル'プロジェクトで行うことができますか? ありがとうございました。

Coca-code avatar Apr 06 '16 00:04 Coca-code

just change the values of 150,150 that is your width and height

jeraldkingn avatar Jul 01 '20 14:07 jeraldkingn

@Coca-code I have not noticed this but what @jeraldkingn suggests seems to be correct.

tnzk avatar Jul 02 '20 05:07 tnzk

@Coca-code Raphael itself does not seem to accept numbers in rem for the size of canvas. Would this work for you:

  1. Create an element styled with width: Xrem; height: Yrem.
  2. Get size of the element in pixel with JS.
  3. Initialize Raphael-Rafar with the size you got above.

tnzk avatar Jul 02 '20 05:07 tnzk