Comments (12)
暂时没有计划。这个需要计算。偏移量
from extended_image.
觉得可以加个rect参数,让开发者自己去指定初始显示区域
from extended_image.
区域是根据Boxfit以及一些参数来计算得出的,不是那么简单的方式
from extended_image.
scale应该也会影响到rect,不知道中心点是不是更合适
from extended_image.
@zmtzawqlp 新版可以居中了,但是有个问题,ExtendedImageGesturePageView的时候,必须先其他方向平移一下才能左平移图片,否则左滑就是切换page
from extended_image.
是你操作的太快了吧,如果是这个问题的话,没法解决,手势那个时候还没有attach。我昨天没发现你说的这个问题呢。
from extended_image.
不是,等待了很久才操作,就好像默认左平移没有获取焦点一样
from extended_image.
print("==================");
print(gestureDetails.movePage(delta));
print(currentPage != pageController.page);
print( widget.canMovePage(gestureDetails));
print("==================");
if ((gestureDetails.movePage(delta) ||
(currentPage != pageController.page)) &&
widget.canMovePage(gestureDetails)) {
_drag?.update(details);
} else {
if (currentPage == pageController.page) {
extendedImageGestureState.gestureDetails = GestureDetails(
offset: gestureDetails.offset +
delta * extendedImageGestureState.imageGestureConfig.speed,
totalScale: gestureDetails.totalScale,
gestureDetails: gestureDetails);
}
}
I/flutter ( 965): ==================
I/flutter ( 965): true
I/flutter ( 965): false
I/flutter ( 965): true
I/flutter ( 965): ==================
I/flutter ( 965): ==================
I/flutter ( 965): true
I/flutter ( 965): true
I/flutter ( 965): ==================
I/flutter ( 965): ==================
I/flutter ( 965): true
I/flutter ( 965): true
I/flutter ( 965): ==================
这是左平移时的打印
from extended_image.
bool movePage(Offset delta) {
print(delta);
print(boundary);
print(_computeHorizontalBoundary);
bool canMoveHorizontal = delta.dx != 0 &&
((delta.dx < 0 && boundary.right) ||
(delta.dx > 0 && boundary.left) ||
!_computeHorizontalBoundary);
bool canMoveVertical = delta.dy != 0 &&
((delta.dy < 0 && boundary.bottom) ||
(delta.dy > 0 && boundary.top) ||
!_computeVerticalBoundary);
return canMoveHorizontal || canMoveVertical || totalScale <= 1.0;
}
@zmtzawqlp 默认boundary.left=true了,不应该是默认全部false吗?
if (_computeHorizontalBoundary) {
//move right
if (result.left > layoutRect.left) {
result = Rect.fromLTWH(
layoutRect.left, result.top, result.width, result.height);
_boundary.left = true;
}
///move left
if (result.right <= layoutRect.right) {
result = Rect.fromLTWH(layoutRect.right - result.width, result.top,
result.width, result.height);
_boundary.right = true;
}
}
本地把等号去掉,没有影响,功能也正常了,不知道会不会对其他场景有影响
from extended_image.
loading state 没居中..
from extended_image.
@BadReese loading state 默认是加载圈+文字,你的文字颜色跟背景一样吧。。( ╯□╰ ),你这个跟这个bug无关
from extended_image.
新版没毛病
from extended_image.
Related Issues (20)
- [Feature request] HOT 1
- [Discussions]同一个原厂图片,postman可以显示,extended_image就会报错,豆瓣图片
- [How to use] I managed to make the crop layer a circle but now I want to actually crop the image. Do I need an external package? from what I can see I can only cropRect HOT 1
- [Bug report] 屏幕旋转会自动飞到下一张 HOT 1
- Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't. HOT 3
- > please take a look at changelog, and pick the version match your flutter sdk version HOT 1
- [How to use] How to change the contrast, brightness, saturation HOT 5
- macos环境不能加载图片 HOT 1
- When using ExtendedImageGesturePageView sliding, fast sliding switch is not smooth
- [Bug report] Exception on flutter run HOT 1
- 在IM类型的App中,我想将不同群的图片放在不同的文件夹中,extended_image中能实现将不同的图片缓存在不同的文件夹中吗? HOT 2
- [Discussions] HOT 1
- How to crop image as a circle? HOT 2
- ExtendedImage.asset不能展示代码中的图片 HOT 4
- 图片闪烁 HOT 4
- [How to use] 图片放大超出遮罩会出现某些问题 HOT 2
- [Bug report]
- No way to catch error [Bug report] HOT 5
- [How to use] 请问,能禁用裁剪框的拖拽吗? HOT 3
- Update dependency web: ^0.5.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extended_image.