olmokramer / atom-autohide-tree-view

Hides most of the tree view, reveal it on hover
MIT License
38 stars 7 forks source link

Failed to execute 'Animate' on 'Element': Partial keyframes are not supported #69

Open danielbayley opened 8 years ago

danielbayley commented 8 years ago

This package no longer works since the latest update to Atom. I just get the above error :disappointed:

Atom 1.7.0 OS X 10.11.4

matthewfarlymn commented 8 years ago

Same with me :(

screen shot 2016-04-14 at 9 21 32 am
cwg999 commented 8 years ago

I didn't get that error, but when I first started up atom it didn't work. I went to view->developer ->reload window and it was fine. . .

matthewfarlymn commented 8 years ago

I'm still getting the same error when I enable the package... Anyone know of an alternative?

Xcodo commented 8 years ago

I'm getting the same issue. The error is thrown every time my cursor passes over the tree view panel.

I've tried reloading and disable-enable the package.

Atom 1.7.2 on Windows 7.

Console:

Window load time: 1419ms
::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
Uncaught (in promise) TypeError: Cannot read property 'style' of undefined
    at updateTreeView (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:91:8)
    at enableAutohide (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:27:3)
    at start (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/main.js:71:3)
    at updateActivationState (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/main.js:47:35)
    at PaneContainer.module.exports.PaneContainer.observePaneItems (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\src\pane-container.js:127:9)
    at Workspace.module.exports.Workspace.observePaneItems (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\src\workspace.js:317:33)
    at C:/Users/Mark/.atom/packages/autohide-tree-view/lib/main.js:28:22
    at process._tickCallback (node.js:392:9)
DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.
    at Error (native)
    at C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:172:48
    at animate (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:169:10)
    at hideTreeView (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:128:10)
    at enableAutohide (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/autohide-tree-view.js:28:3)
    at start (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/main.js:71:3)
    at updateActivationState (C:/Users/Mark/.atom/packages/autohide-tree-view/lib/main.js:47:35)
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at PaneContainer.module.exports.PaneContainer.didDestroyPaneItem (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\src\pane-container.js:302:27)
    at Pane.module.exports.Pane.removeItem (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\src\pane.js:576:17)
    at Pane.module.exports.Pane.destroyItem (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\src\pane.js:637:16)
    at atom-tabs.TabBarView.onClick (C:\Users\Mark\AppData\Local\atom\app-1.7.2\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:658:17)
DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.(…)
DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.(…)
DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.(…)
DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.(…)
duclet commented 8 years ago

The issue seems to be that if you leave the default "minWidth" to the default value of 5, when it gets the value, it thinks it is 0. As such, the animation fails. If you set the "minWidth" to so other non-default value (besizes 0), it should work again. Though it seems like the animation effect is broken too.

matthewfarlymn commented 8 years ago

Thanks for the update @duclet I changed the default to 10 and back to 5 and now it's hiding and showing again.

danielbayley commented 8 years ago

I just set minWidth to 1, and it is hiding/showing now, but no animation.

Also, is there a reason why minWidth can't be set to 0?

duclet commented 8 years ago

@danielbayley It seems like the API of animate may have changed or made stricter. Reason the animation no longer was working and the fact that minWidth can't be 0 was because animation of the width requires the measurement type (pixels, em, etc). I've created a pull request that addresses the issue. Hopefully it gets accepted soon.