2024-10-29, 19:54
I have a problem regarding how zoom animations are performed.
If this animation is inserted inside the image, the zoom is performed correctly from center 100 towards center 140.
But if the zoom is inserted inside a group, the group zoom is not done correctly from center 100 towards center 140, but is moved slightly to the left and therefore is not central.
Is this behavior normal?
I leave the code below:
zoom ok, from center 100 to center 140 (zoom animation remains central):
incorrect zoom from center 100 to center 140 (zoom animation remains moving to the left):
Is it wrong to use animation inside a group in a focused layout?
Why do i get this shift in zoom?
Any help is appreciated.
Thank you all
If this animation is inserted inside the image, the zoom is performed correctly from center 100 towards center 140.
xml:<animation effect="zoom" start="100" end="120" center="auto" time="200">Focus</animation>
<animation effect="zoom" start="120" end="100" center="auto" time="200">UnFocus</animation>
But if the zoom is inserted inside a group, the group zoom is not done correctly from center 100 towards center 140, but is moved slightly to the left and therefore is not central.
Is this behavior normal?
I leave the code below:
zoom ok, from center 100 to center 140 (zoom animation remains central):
xml:
<itemlayout height="397" width="320"....
<focusedlayout height="397" width="320" condition="Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons)">
<control type="group">
<control type="image">
<top>15</top>
<left>-45</left>
<width>360</width>
<height>400</height>
<animation effect="zoom" start="100" end="140" center="auto" time="200">Focus</animation>
<animation effect="zoom" start="140" end="100" center="auto" time="200">UnFocus</animation>
<texture background="true">CoverShadow.png</texture>
<aspectratio>stretch</aspectratio>
<visible>String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)</visible>
</control>
<control type="image">
<top>45</top>
<left>-9</left>
<width>278</width>
<height>356</height>
<animation effect="zoom" start="100" end="140" center="auto" time="200">Focus</animation>
<animation effect="zoom" start="140" end="100" center="auto" time="200">UnFocus</animation>
<texture fallback="DefaultVideo.png" diffuse="CoverBorder.png" background="true">$INFO[ListItem.Art(poster)]</texture>
<visible>String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)</visible>
</control>
<control type="image">
<top>342</top>
<left>233</left>
<width>50</width>
<height>50</height>
<animation effect="zoom" start="100" end="140" center="auto" time="200">Focus</animation>
<animation effect="zoom" start="140" end="100" center="auto" time="200">UnFocus</animation>
<texture>overlaywatched.png</texture>
<visible>Integer.IsGreater(ListItem.Playcount,0)</visible>
</control>
</control>
</focusedlayout>
incorrect zoom from center 100 to center 140 (zoom animation remains moving to the left):
xml:<focusedlayout height="397" width="320" condition="Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons)">
<control type="group">
<animation effect="zoom" start="100" end="140" center="auto" time="200">Focus</animation>
<animation effect="zoom" start="140" end="100" center="auto" time="200">UnFocus</animation>
<control type="image">
<top>15</top>
<left>-45</left>
<width>360</width>
<height>400</height>
<texture background="true">CoverShadow.png</texture>
<aspectratio>stretch</aspectratio>
<visible>String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)</visible>
</control>
<control type="image">
<top>45</top>
<left>-9</left>
<width>278</width>
<height>356</height>
<texture fallback="DefaultVideo.png" diffuse="CoverBorder.png" background="true">$INFO[ListItem.Art(poster)]</texture>
<visible>String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)</visible>
</control>
<control type="image">
<top>342</top>
<left>233</left>
<width>50</width>
<height>50</height>
<texture>overlaywatched.png</texture>
<visible>Integer.IsGreater(ListItem.Playcount,0)</visible>
</control>
</control>
</focusedlayout>
Is it wrong to use animation inside a group in a focused layout?
Why do i get this shift in zoom?
Any help is appreciated.
Thank you all