Skip to content

[BUG] - Center Content, doesn't actually center the content based on the content dimensions. #36

@davidmarogy

Description

@davidmarogy

Hello I am trying to implement zoom and pan for a single picture in Angular.
The picture is much bigger than the the parent container. Therefore i wanted to center the picture to match the dimensions of the container. But currently center content is only centering so that the content top and left are 0. Also panning only work for the given container dimensions. It would be nice to pan till reaching the contents dimension. I also tried setting the initial pan x and y but on centering the piccture it jumped back the the left corner.

My container is about: height: 150 px width: 100px,
Image is without setting these parameters about: (but picture can have different dimension)height:500px, width: 750px

image

image
image
image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions