Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

panToMove only works with 2 fingers #117

Open
SerdarMustafa1 opened this issue Dec 5, 2019 · 0 comments
Open

panToMove only works with 2 fingers #117

SerdarMustafa1 opened this issue Dec 5, 2019 · 0 comments
Labels

Comments

@SerdarMustafa1
Copy link

I have tried to use the panToMove prop but it does not appear to work. I can zoom fine but pan only works with 2 fingers.

                <View style={styles.details}>
                  <View style={styles.detailsItem}>
                    <Text style={texts.bodyWhite}>Shots</Text>
                    <TextInput
                      style={styles.input}
                      defaultValue={log.shots.toString()}
                      editable={false}
                    />
                  </View>
                  <View style={styles.detailsItem}>
                    <Text style={texts.bodyWhite}>Score</Text>
                    <TextInput
                      style={styles.input}
                      onChangeText={value => updateScore(value)}
                      clearTextOnFocus
                      keyboardType="number-pad"
                      returnKeyType="done"
                    />
                  </View>
                </View>

                <View style={styles.analyzer}>
                  <ImageZoom
                    cropWidth={Dimensions.get("window").width}
                    cropHeight={Dimensions.get("window").height}
                    imageWidth={300}
                    imageHeight={300}
                    panToMove={true}
                  >
                    <TouchableOpacity
                      activeOpacity={1}
                      style={styles.pointer}
                      onPress={evt => addShot(evt.nativeEvent)}
                    >
                      <View
                        style={[
                          styles.instructions,
                          log.heatmap.length > 0
                            ? { zIndex: -5 }
                            : { zIndex: 20 },
                        ]}
                      >
                        <Text style={texts.headerBody}>
                          Tap the picture to add &amp; remove shots.
                        </Text>
                      </View>

                      <Image
                        style={{ width: 300, height: 300 }}
                        source={{ uri: `data:image/jpg;base64,${log.image}` }}
                      />

                      {log.heatmap.length > 0 &&
                        log.heatmap.map((shot, index) => {
                          return (
                            <TouchableOpacity
                              key={index}
                              onPress={() => removeShot(index)}
                              style={[
                                styles.shot,
                                { left: shot.x - 10, top: shot.y - 10 },
                              ]}
                            />
                          );
                        })}
                    </TouchableOpacity>
                  </ImageZoom>
                </View>
              ```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants