Skip to content

Commit

Permalink
code-panel: hide if minimized
Browse files Browse the repository at this point in the history
  • Loading branch information
legomushroom committed Oct 5, 2016
1 parent 1d53915 commit 6a2ac06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion app/build/mojs-curve-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10717,7 +10717,9 @@ return /******/ (function(modules) { // webpackBootstrap
var state = _ref.state;
var points = state.points;
var controls = state.controls;
var open = controls.isCode ? CLASSES['is-open'] : '';

var isShow = controls.isCode && !controls.isMinimize;
var open = isShow ? CLASSES['is-open'] : '';
var mainClass = CLASSES['code-panel'] + ' ' + open;

return (0, _preact.h)(
Expand Down
10 changes: 5 additions & 5 deletions app/build/mojs-curve-editor.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions app/js/tags/code-panel.babel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import ResizeHandle from './resize-handle';
require('../../css/blocks/code-panel');
const CLASSES = require('../../css/blocks/code-panel.postcss.css.json');
export default ({state}) => {
const {points, controls} = state,
open = (controls.isCode) ? CLASSES['is-open'] : '',
mainClass = `${CLASSES['code-panel']} ${open}`;
const {points, controls} = state;
const isShow = controls.isCode && !controls.isMinimize
const open = (isShow) ? CLASSES['is-open'] : '';
const mainClass = `${CLASSES['code-panel']} ${open}`;

return <div className={mainClass}>
<div className={ CLASSES['code-panel__inner'] }>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mojs-curve-editor",
"version": "1.4.3",
"version": "1.4.4",
"description": "mojs GUI for editing easing/property curves",
"keywords": [
"mojs",
Expand Down

0 comments on commit 6a2ac06

Please sign in to comment.