MCPcopy Index your code
hub / github.com/react/react / applyRenderableNodeProps

Function applyRenderableNodeProps

packages/react-art/src/ReactFiberConfigART.js:186–212  ·  view source on GitHub ↗
(instance, props, prevProps = {})

Source from the content-addressed store, hash-verified

184}
185
186function applyRenderableNodeProps(instance, props, prevProps = {}) {
187 applyNodeProps(instance, props, prevProps);
188
189 if (prevProps.fill !== props.fill) {
190 if (props.fill && props.fill.applyFill) {
191 props.fill.applyFill(instance);
192 } else {
193 instance.fill(props.fill);
194 }
195 }
196 if (
197 prevProps.stroke !== props.stroke ||
198 prevProps.strokeWidth !== props.strokeWidth ||
199 prevProps.strokeCap !== props.strokeCap ||
200 prevProps.strokeJoin !== props.strokeJoin ||
201 // TODO: Consider deep check of stokeDash; may benefit VML in IE.
202 prevProps.strokeDash !== props.strokeDash
203 ) {
204 instance.stroke(
205 props.stroke,
206 props.strokeWidth,
207 props.strokeCap,
208 props.strokeJoin,
209 props.strokeDash,
210 );
211 }
212}
213
214function applyShapeProps(instance, props, prevProps = {}) {
215 applyRenderableNodeProps(instance, props, prevProps);

Callers 2

applyShapePropsFunction · 0.85
applyTextPropsFunction · 0.85

Calls 2

applyNodePropsFunction · 0.85
applyFillMethod · 0.45

Tested by

no test coverage detected