Skip to content

Allow static images without zooming#31

Closed
jukkatupamaki wants to merge 3 commits intomifi:masterfrom
jukkatupamaki:feature/zoom-parameters
Closed

Allow static images without zooming#31
jukkatupamaki wants to merge 3 commits intomifi:masterfrom
jukkatupamaki:feature/zoom-parameters

Conversation

@jukkatupamaki
Copy link
Copy Markdown

These changes make the Ken Burns effect optional. If a clip does not specify the zoomDirection parameter, it renders a static image instead.

@mifi
Copy link
Copy Markdown
Owner

mifi commented Apr 30, 2020

Thanks for the PR, but can't the same be achieved by setting scaleFactor to 0?

@jukkatupamaki
Copy link
Copy Markdown
Author

Yes that is true but it is a bit counter intuitive. 😕 By looking at the json config, I’d expect it to not zoom in/out if I leave out both direction and amount. I guess I could have changed just the default factor from 1 to 0.

@mifi
Copy link
Copy Markdown
Owner

mifi commented May 1, 2020

I agree it's a bit counter intuitive. I wanted the defaults to be opinionated and "feature rich". That's why also there is random background colors, random gradients and random transitions enabled by default. Maybe we can just make it so that if zoomDirection is anything else than 'in' or 'out', then zooming is also disabled?

@chapmanjacobd
Copy link
Copy Markdown
Contributor

chapmanjacobd commented May 1, 2020

I agree the opinionated defaults are nice but it would be good to also have an unopinionated example template that people could use. Can we do something like

defaults: {
    layers: [ 
        { type: 'image', zoomDirection: 'none' }
    ]
},

So we don't need to specify it on each one?

mifi added a commit that referenced this pull request May 2, 2020
@mifi
Copy link
Copy Markdown
Owner

mifi commented May 2, 2020

I implemented this check now, so you can use zoomDirection: null or 'none' or anything else to disable. Thanks @tukkajukka

@mifi mifi closed this May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants