rmp icon indicating copy to clipboard operation
rmp copied to clipboard

PreComponent and afterComponent

Open thekingofcity opened this issue 3 months ago • 0 comments

This feature is utilized for specific scenarios such as MRT out-of-station interchanges and the JR East line style. Typically, these scenarios entail some form of opening in the outline of the element: a white outline for MRT out-of-station interchanges and a black outline for the JR East line style.

image image

Presently, even with z-index, it is not possible to position another element just above the outline and beneath the main element. You're faced with a choice: either place an element beneath both the main element and its outline, or position it above both.

To address this limitation, this proposal suggests expanding the current component into three parts: preComponent, component, and afterComponent. Elements requiring an outline could draw their outline in preComponent, while the main content would reside in either component or afterComponent. It's advisable to render the main content in afterComponent to allow other elements to be positioned between preComponent and afterComponent without requiring adjustments to their z-index.

This feature is assigned a lower priority in terms of z-index, meaning it will only function when elements share the same z-index level. Elements outside this level will either be positioned beneath or above the entire element.

thekingofcity avatar Mar 19 '24 07:03 thekingofcity