Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 image controls fix #492

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"author": "Jyoti Puri",
"devDependencies": {
"@storybook/react": "^3.1.9",
"autoprefixer": "^7.1.2",
"babel-core": "^6.25.0",
"babel-eslint": "^7.2.3",
Expand All @@ -21,8 +22,8 @@
"chai": "^4.1.0",
"cross-env": "^5.0.1",
"css-loader": "^0.28.4",
"draft-js": "^0.10.1",
"draftjs-to-html": "^0.7.5",
"draft-js": "^0.10.3",
"draftjs-to-html": "^0.7.6",
"draftjs-to-markdown": "^0.4.4",
"enzyme": "^2.9.1",
"eslint": "^4.3.0",
Expand All @@ -34,25 +35,24 @@
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"flow-bin": "^0.51.0",
"html-to-draftjs": "^0.1.0-beta15",
"html-to-draftjs": "^1.0.1",
"immutable": "^4.0.0-rc.1",
"jsdom": "^9.12.0",
"mocha": "^3.4.2",
"postcss-loader": "^2.0.6",
"precss": "^2.0.0",
"react": "^15.6.1",
"react": "^16.0.0",
"react-addons-test-utils": "^15.6.0",
"react-dom": "^15.6.1",
"react-dom": "^16.0.0",
"rimraf": "^2.6.1",
"sinon": "^2.3.8",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"webpack": "^3.3.0",
"@storybook/react": "^3.1.9"
"webpack": "^3.3.0"
},
"dependencies": {
"classnames": "^2.2.5",
"draftjs-utils": "^0.8.07",
"draftjs-utils": "^0.8.08",
"prop-types": "^15.5.10"
},
"peerDependencies": {
Expand Down
11 changes: 2 additions & 9 deletions src/renderer/Image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ const getImageComponent = config => class Image extends Component {
});
};

toggleHovered: Function = (): void => {
const hovered = !this.state.hovered;
this.setState({
hovered,
});
};

renderAlignmentOptions(alignment): Object {
return (
<div
Expand Down Expand Up @@ -88,8 +81,8 @@ const getImageComponent = config => class Image extends Component {

return (
<span
onMouseEnter={this.toggleHovered}
onMouseLeave={this.toggleHovered}
onMouseEnter={() => this.setState({ hovered: true })}
onMouseLeave={() => this.setState({ hovered: false })}
className={classNames(
'rdw-image-alignment',
{
Expand Down
75 changes: 48 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2:
create-hash "^1.1.0"
inherits "^2.0.1"

create-react-class@^15.5.2, create-react-class@^15.6.0:
create-react-class@^15.5.2:
version "15.6.0"
resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4"
dependencies:
Expand Down Expand Up @@ -2085,24 +2085,26 @@ dot-prop@^4.1.0:
dependencies:
is-obj "^1.0.0"

draft-js@^0.10.1:
version "0.10.1"
resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.1.tgz#6f1219d8095729691429ca6fd7a58d2a8be5cb67"
draft-js@^0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.3.tgz#5f3c3025af9f494c62f00a9066006ccdc1b3c943"
dependencies:
fbjs "^0.8.7"
enzyme "^2.9.1"
fbjs "^0.8.15"
immutable "~3.7.4"
object-assign "^4.1.0"

draftjs-to-html@^0.7.5:
version "0.7.5"
resolved "https://registry.yarnpkg.com/draftjs-to-html/-/draftjs-to-html-0.7.5.tgz#50b2d1d813fb499966de8106fbeea9ea52c76951"
draftjs-to-html@^0.7.6:
version "0.7.6"
resolved "https://registry.yarnpkg.com/draftjs-to-html/-/draftjs-to-html-0.7.6.tgz#95bc55aeeca6c6a7abc242c5616946704c6685c9"

draftjs-to-markdown@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/draftjs-to-markdown/-/draftjs-to-markdown-0.4.4.tgz#cff9cbdf6999c2c70005f6b641aae794ef7d396e"

"draftjs-utils@file:../draftjs-utils":
version "0.8.7"
draftjs-utils@^0.8.08:
version "0.8.8"
resolved "https://registry.yarnpkg.com/draftjs-utils/-/draftjs-utils-0.8.8.tgz#5835daed95f59d3ee1f96fdcbbb9809772c86490"

ecc-jsbn@~0.1.1:
version "0.1.1"
Expand Down Expand Up @@ -2571,7 +2573,19 @@ fastparse@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"

fbjs@^0.8.7, fbjs@^0.8.8, fbjs@^0.8.9:
fbjs@^0.8.15, fbjs@^0.8.16:
version "0.8.16"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
dependencies:
core-js "^1.0.0"
isomorphic-fetch "^2.1.1"
loose-envify "^1.0.0"
object-assign "^4.1.0"
promise "^7.1.1"
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

fbjs@^0.8.8, fbjs@^0.8.9:
version "0.8.12"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
dependencies:
Expand Down Expand Up @@ -2982,9 +2996,9 @@ html-tag-names@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22"

html-to-draftjs@^0.1.0-beta15:
version "0.1.0-beta9"
resolved "https://registry.yarnpkg.com/html-to-draftjs/-/html-to-draftjs-0.1.0-beta9.tgz#6e61455d9afb4b71f1fc0ea79fa033fa83e934e0"
html-to-draftjs@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/html-to-draftjs/-/html-to-draftjs-1.0.1.tgz#64ef414ef84ed48ed6afc81ae5f20c4e811577d2"

htmlparser2@^3.9.1:
version "3.9.2"
Expand Down Expand Up @@ -4680,6 +4694,14 @@ prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.7, prop-types@^15.5.8,
fbjs "^0.8.9"
loose-envify "^1.3.1"

prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"

proxy-addr@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3"
Expand Down Expand Up @@ -4784,14 +4806,14 @@ react-dom-factories@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.0.tgz#f43c05e5051b304f33251618d5bc859b29e46b6d"

react-dom@^15.6.1:
version "15.6.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470"
react-dom@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58"
dependencies:
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.10"
object-assign "^4.1.1"
prop-types "^15.6.0"

react-html-attributes@^1.3.0:
version "1.3.0"
Expand Down Expand Up @@ -4864,15 +4886,14 @@ react-style-proptype@^3.0.0:
dependencies:
prop-types "^15.5.4"

react@^15.6.1:
version "15.6.1"
resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"
react@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d"
dependencies:
create-react-class "^15.6.0"
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.10"
object-assign "^4.1.1"
prop-types "^15.6.0"

read-cache@^1.0.0:
version "1.0.0"
Expand Down