MyPinchZoomView имеет состояние «масштаб». В приведенной ниже настройке, как компонент «доска» может отслеживать текущий масштаб?
render() {
return (
<MyPinchZoomView
minScale={0.9}
maxScale={2}
>
{ this.board }
</MyPinchZoomView>
)
}
Тот же вопрос, если бы я добавил MyPinchZoomView в компонент платы:
return (
<View>
<MyPinchZoomView
minScale={0.9}
maxScale={2}
>
{ this.fields }
{ this.rackFields }
{ this.figures }
</MyPinchZoomView>
<Toolbar board={this} figures={this.figures}></Toolbar>
<Text>{this.state.lastRefresh}</Text>
<Moves game={this.props.game} lastRefresh={this.state.lastRefresh}/>
<FlashMessage position="top" ref="errorMessage" />
</View>
)
}