@mocanvas/editor · function

getSharedOpacity

declare function getSharedOpacity(editor: Editor): TLSharedOpacity | undefined

The opacity of the current selection, as the style panel needs it.

undefined with nothing selected (the panel falls back to the next-shape value), mixed when the selected shapes disagree — the same three-state answer every other style gives, so one control can render all of them.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.