react-native - React Native Expo - 放大图像大小会导致未包含所有图像
问题描述
这是我的图像组件:
<Marker
style={{width: this.state.smallItemsSize, height: this.state.smallItemsSize}}
key={itemInstance.id}
coordinate={{
latitude: itemInstance.lat,
longitude: itemInstance.lng
}}>
<Image resizeMethod='resize' resizeMode="stretch" source={{ uri: `${Constants.manifest.extra.server.baseUrl}${itemInstance.imageUrl}` }} width={50} height={50} style={{width: this.state.smallItemsSize, height: this.state.smallItemsSize}} />
</Marker>
当我将状态更改为更大的数字时,将导致如下:
但是如果我将状态更改为较小的数字,然后再将其放大,一切都很好..是错误还是什么?据我记得,以前一切都很好。
解决方案
我通过向标记样式添加最大可能大小来解决我的问题。
推荐阅读
- flutter - 页面加载后如何启动 AnimatedContainer 动画?
- java - 将文件中的键值对添加到 Hashmap
- python-3.x - 使用 Nginx + Gunicorn + Flask 时 Websocket 连接失败
- php - axios 和 vuex 正在删除数组中的错误索引
- prolog - 来自不同城市的候选人名单
- php - 使用正则表达式从 PHP 中的 JS 对象文字字符串中提取一些数据
- laravel - 如何调用 .env {{ env('APP_NAME} }} 到 laravel 刀片模板?
- c# - uwp beforetextchanged 光标在文本前面移动
- ibm-cloud - 如何仅从变量中提取数字
- python - Python pdf2txt 清理问题