You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'polar-origin' property sets a point of origin for polar coordinate system.
348
+
<br>
349
+
In conventional coordinate system, the origin of coordinate system implicitly set to upper left corner of the containing block. According to the origin, not only elements are positioned within the containing block but also prope
350
+
기존 방식은 origin이 암시적으로(implicitly) containing block의 left-top으로 셋팅이 되어있고, 해당 origin을 기준으로 엘리먼트가 배치되고 display, margin, padding 등의 property들도 이러한 배경하에 동작을 했다. 하지만 polar좌표계에서는 이러한 origin이 기존의 left-top이 아닌 center로 명시되는 것이 합리적이며, 이 값은 필요에 따라 변경 가능한 상황이 발생할 수 있다.
351
+
</p>
347
352
<pre class='propdef'>
348
353
Name: polar-origin
349
354
Applies to: all elements
@@ -376,7 +381,7 @@ Where
376
381
]
377
382
</dl>
378
383
379
-
Values are defined like below:
384
+
Values are defined as follows:
380
385
381
386
<dl>
382
387
<dt><var><percentage></var></dt>
@@ -393,35 +398,35 @@ A length value gives a fixed length as the offset. The value for the horizontal
393
398
</dl>
394
399
395
400
<dl>
396
-
<dt>top</dt>
401
+
<dt><var>top</var></dt>
397
402
<dd>
398
403
Computes to 0% for the vertical position.
399
404
</dd>
400
405
</dl>
401
406
402
407
<dl>
403
-
<dt>right</dt>
408
+
<dt><var>right</var></dt>
404
409
<dd>
405
410
Computes to 100% for the horizontal position.
406
411
</dd>
407
412
</dl>
408
413
409
414
<dl>
410
-
<dt>bottom</dt>
415
+
<dt><var>bottom</var></dt>
411
416
<dd>
412
417
Computes to 100% for the vertical position.
413
418
</dd>
414
419
</dl>
415
420
416
421
<dl>
417
-
<dt>left</dt>
422
+
<dt><var>left</var></dt>
418
423
<dd>
419
424
Computes to 0% for the horizontal position.
420
425
</dd>
421
426
</dl>
422
427
423
428
<dl>
424
-
<dt>center</dt>
429
+
<dt><var>center</var></dt>
425
430
<dd>
426
431
Computes to 50% (left 50%) for the horizontal position if the horizontal position is not otherwise specified, or 50% (top 50%) for the vertical position if it is.
427
432
</dd>
@@ -431,6 +436,9 @@ Computes to 50% (left 50%) for the horizontal position if the horizontal positio
431
436
<p class="issue">
432
437
Between the item and the containing block, which is appropriate for polar-origin value to be referenced of?
433
438
</p>
439
+
<p class="issue">
440
+
According to enable to specify the point of origin for polar coordinates, properties for specifying layout such as 'margin', 'padding' would work different from the conventional coordinate system. We need different approaches to define those properties.
The <code>'polar-distance'</code> specifies the distance between the origin of polar coordinates and the anchor point of the element.
470
+
465
471
<br>
466
-
The first value specifies the distance between the origin of polar coordinates and the anchor point of the element. The second value may be omitted. If not so, it affects the calculated value of the first value.
467
-
<br><br>
468
472
Values have the following meanings:
469
473
<dl>
470
474
<dt><var><length></var></dt>
@@ -479,9 +483,12 @@ A percentage is relative to the distance from a point of contact which is made b
479
483
</dd>
480
484
</dl>
481
485
<dl>
482
-
<dt>contain</dt>
486
+
<dt><var>contain</var></dt>
483
487
<dd>
484
-
Adjust polar-distance value when positioned element within containing block overflows shape of the containing block. The main purpose for this value is avoiding overflow of positioning elements. When overflowing occurs, the distance between the center point of containing block and the anchor point of the element is reduced until there are less than 2 points of contact between edge of shape of containing block and content block of the element.
488
+
Adjust polar-distance value of the positioned element which overflows shape of the containing block.
489
+
The main purpose of this value is avoiding overflow when positioning elements.
490
+
When overflowing occurs, the distance between the point of origin of polar coordinates and the anchor point of the element is reduced,
491
+
until there are 2 contact points or less between edge of shape of containing block and content block of the element.
485
492
</dd>
486
493
</dl>
487
494
</p>
@@ -629,19 +636,28 @@ Is '<code>auto</code>' needed for value of 'polar-anchor'?
629
636
How to solve overflowing when an element has 'polar-anchor' value as '<code>top</code>', 'polar-angle' value is 0deg, and 'polar-distance' is equal to the distance from center to edge of containing block?
630
637
</p>
631
638
632
-
<h2 id="extending-svg-transform-functions">Rotating content in polar coordinates</h2>
<h3 id="2d-rotation-transform-function">2D Rotation Transform Function for self-rotating elements in polar coordinates</h3>
634
640
<p>
635
-
The 'transform' property supports all transform functions by <a href="http://www.w3.org/TR/SVG/coords.html#TransformAttribute">The ''transform'' attribute</a> in [[SVG11]].
636
641
When elements are positioned in polar coordinates, there are many usecases which show the elements rotated toward the origin of polar coordinates. In such cases, degree of rotation has to be specified in the 2d rotation function for each element. But when using the keyword value instead of the <<angle>> value, the calculation of accurate rotation degree may be omitted.
637
642
<br><br>
638
643
The two-dimensional rotation function <code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">'rotate(<angle>)'</a></code> used in polar coordinates is extended as follows:
<code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">rotate()</a> = rotate( <<angle>> | center | counter-center)</code>
641
646
</dd></dl>
642
-
The '<code>center</code>' keyword means that the element is rotated with the 'polar-angle' value. Therefore, when the anchor point of an element is center point of the
643
-
element, a straight line passing through the anchor point meets the origin of the containing block.<br>
644
-
And for the '<code>counter-center</code>', the element is rotated by the angle of the 'polar-angle' plus 180 degrees.
647
+
Values have the following meanings:
648
+
<dl>
649
+
<dt><var>center</var></dt>
650
+
<dd>
651
+
Rotate an element by the 'polar-angle' value. Therefore, when the anchor point of an element is center point of the
652
+
element and there is a perpendicular line which passes through the anchor point, the line meets the origin of the containing block.
653
+
</dd>
654
+
</dl>
655
+
<dl>
656
+
<dt><var>counter-center</var></dt>
657
+
<dd>
658
+
Rotate an element by the angle of the 'polar-angle' plus 180 degrees.
659
+
</dd>
660
+
</dl>
645
661
</p>
646
662
<div class='example'>
647
663
This example shows how the keyword value works in the 2d rotation function.
@@ -686,12 +702,12 @@ This example shows how the keyword value works in the 2d rotation function.
0 commit comments