MCPcopy Create free account
hub / github.com/microsoft/SandDance / renderLayers

Method renderLayers

docs/tests/v2/es6/js/sanddance.js:145063–145126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145061 }
145062
145063 renderLayers() {
145064 const {
145065 data,
145066 scale,
145067 iconAtlas,
145068 iconMapping
145069 } = this.state;
145070 const {
145071 getPosition,
145072 getColor,
145073 getSize,
145074 getAngle,
145075 getHighlightColor,
145076 getTextAnchor,
145077 getAlignmentBaseline,
145078 getPixelOffset,
145079 fp64,
145080 sdf,
145081 sizeScale,
145082 transitions,
145083 updateTriggers
145084 } = this.props;
145085 const SubLayerClass = this.getSubLayerClass('characters', _chromaticMultiIconLayer.MultiIconLayer);
145086 return new SubLayerClass({
145087 sdf,
145088 iconAtlas,
145089 iconMapping,
145090 getPosition: d => getPosition(d.object),
145091 getColor: this._getAccessor(getColor),
145092 getSize: this._getAccessor(getSize),
145093 getAngle: this._getAccessor(getAngle),
145094 getHighlightColor: this._getAccessor(getHighlightColor),
145095 getAnchorX: this.getAnchorXFromTextAnchor(getTextAnchor),
145096 getAnchorY: this.getAnchorYFromAlignmentBaseline(getAlignmentBaseline),
145097 getPixelOffset: this._getAccessor(getPixelOffset),
145098 fp64,
145099 sizeScale: sizeScale * scale,
145100 transitions: transitions && {
145101 getPosition: transitions.getPosition,
145102 getAngle: transitions.getAngle,
145103 getHighlightColor: transitions.getHighlightColor,
145104 getColor: transitions.getColor,
145105 getSize: transitions.getSize,
145106 getPixelOffset: updateTriggers.getPixelOffset
145107 }
145108 }, this.getSubLayerProps({
145109 id: 'characters',
145110 updateTriggers: {
145111 getPosition: updateTriggers.getPosition,
145112 getAngle: updateTriggers.getAngle,
145113 getHighlightColor: updateTriggers.getHighlightColor,
145114 getColor: updateTriggers.getColor,
145115 getSize: updateTriggers.getSize,
145116 getPixelOffset: updateTriggers.getPixelOffset,
145117 getAnchorX: updateTriggers.getTextAnchor,
145118 getAnchorY: updateTriggers.getAlignmentBaseline
145119 }
145120 }), {

Callers 3

sanddance-app.jsFile · 0.80
sanddance.jsFile · 0.80

Calls 6

_getAccessorMethod · 0.95
getLetterOffsetMethod · 0.95
getTextLengthMethod · 0.95
getPositionFunction · 0.70

Tested by

no test coverage detected