Add key to SchemeView
This commit is contained in:
parent
9c5c4b5747
commit
b68fa02fa4
@ -1,7 +1,7 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.version=1.6.10
|
||||
|
||||
compose.version=1.2.0-alpha01-dev774
|
||||
compose.version=1.2.0-beta01
|
||||
|
||||
agp.version=4.2.2
|
||||
android.useAndroidX=true
|
||||
|
@ -45,7 +45,8 @@ public fun SchemeView(
|
||||
featuresState: SchemeFeaturesState,
|
||||
config: SchemeViewConfig = SchemeViewConfig(),
|
||||
modifier: Modifier = Modifier.fillMaxSize(),
|
||||
) {
|
||||
) = key(initialViewPoint) {
|
||||
|
||||
var canvasSize by remember { mutableStateOf(defaultCanvasSize) }
|
||||
|
||||
var viewPoint by remember { mutableStateOf(initialViewPoint) }
|
||||
@ -133,7 +134,7 @@ public fun SchemeView(
|
||||
setViewPoint(newViewPoint)
|
||||
}.fillMaxSize()
|
||||
|
||||
val painterCache = key(featuresState){
|
||||
val painterCache = key(featuresState) {
|
||||
featuresState.features().values.filterIsInstance<PainterFeature>().associateWith { it.painter() }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user