View / apply constraints when an interaction starts
Previously, an interaction could begin while target values (center/resolution) were out of the allowed range, causing a glitch where the view zoom/position would jump suddenly.
This commit is contained in:
@@ -1325,10 +1325,14 @@ class View extends BaseObject {
|
||||
|
||||
/**
|
||||
* Notify the View that an interaction has started.
|
||||
* The view state will be resolved to a stable one if needed
|
||||
* (depending on its constraints).
|
||||
* @api
|
||||
*/
|
||||
beginInteraction() {
|
||||
this.setHint(ViewHint.INTERACTING, 1);
|
||||
|
||||
this.resolveConstraints(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user