I have been using a few door animations that I set-up a while back triggered from door sensors. They were working all OK
Just recently they have been flying off the screen and the anchor point seems to not be working, animation still triggers and color change works but not opening from top corner. I have recently upgraded floorplan / HASSio and moved some yaml files around to tidy up my structure, but not sure why its happening.
CSS
@keyframes rotate-90 {
100% {
transform: rotate(-90deg);
}
}
@keyframes rotateReset-90 {
0% {
transform: rotate(-90deg);
}
100% {
transform: none;
}
}
/* Doors that open to the top left */
#binary_sensor\.door_sensor_1_sensor {
transform-origin: top left;
}
.door_closed {
fill: #00ccff !important;
fill-opacity: 1;
animation-duration: 2s;
animation-name: rotateReset-90;
}
.door_open {
fill: rgb(185, 142, 134) !important;
fill-opacity: 1;
animation-duration: 2s;
animation-name: rotate-90;
animation-fill-mode: forwards;
}
I was just about to make excactly the same topic, since I have the same problem.
I am pretty sure the problem is because google chrome recently changed to version 64.
But I have no idea how to fix the problem.
I have tried the transform: rotate also but found it temperamental, still have not figured out if itās the svg object size/shape/position or the whole svg.
You may have to play with ātransform-originā to get a fix on the hinge side of the door.
Iām no expert in CSS animations or yaml really I have just started with Hass/io so not sure where to go with the transform origin, i tried top right etcā¦
I went back to an older backup of my SVG, still same issue.
I also created a entirely new one with just a door the same results
My animations are still working in Chrome 64. Not sure if it will help you guys, but I had some issues with my ceiling fan rotation spinning off the screen on android chrome. I recently added the ātransform-box:filil-box;ā change to fix:
I know itās a very late reply, but I was having the same issue just now and found this thread. In any case I eventually found a solution, so I thought I might as well add it here in case someone else finds this thread later.
In my case it was because Adobe Illustrator had used a transform to position the PNG instead of using the XML tagās X and Y attributes. So when the CSS modified the transform options, that also affected the positioningā¦
I inserted the PNG using Inkscape instead, which used proper X and Y attributes instead of a transform, but while I was doing that I accidentally changed the SVG file enough that my floorplan setup stopped working properly.
In the end I edited the SVG file manually and copied the fixed tag from the Inkscape copy. You may even be able to just manually replace the transform attribute with X and Y attributes.