From c24a5c5a9ac16fdb249656f0c238b8e44727123c Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 23 Mar 2016 16:56:30 -0400 Subject: Fixed unicode emoji not having a consistent size --- webapp/components/post_body.jsx | 5 ++--- webapp/components/rhs_comment.jsx | 6 +++++- webapp/components/rhs_root_post.jsx | 5 ++--- webapp/utils/constants.jsx | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'webapp') diff --git a/webapp/components/post_body.jsx b/webapp/components/post_body.jsx index cb682abba..884dbbbbb 100644 --- a/webapp/components/post_body.jsx +++ b/webapp/components/post_body.jsx @@ -5,7 +5,6 @@ import ReactDOM from 'react-dom'; import FileAttachmentList from './file_attachment_list.jsx'; import UserStore from 'stores/user_store.jsx'; import * as Utils from 'utils/utils.jsx'; -import * as Emoji from 'utils/emoticons.jsx'; import Constants from 'utils/constants.jsx'; import * as TextFormatting from 'utils/text_formatting.jsx'; import twemoji from 'twemoji'; @@ -52,9 +51,9 @@ class PostBody extends React.Component { parseEmojis() { twemoji.parse(ReactDOM.findDOMNode(this), { - className: 'emoji twemoji', + className: 'emoticon', base: '', - folder: Emoji.getImagePathForEmoticon() + folder: Constants.EMOJI_PATH }); } diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index de99eb37d..53170ee15 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -70,7 +70,11 @@ class RhsComment extends React.Component { this.forceUpdate(); } parseEmojis() { - twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE}); + twemoji.parse(ReactDOM.findDOMNode(this), { + className: 'emoticon', + base: '', + folder: Constants.EMOJI_PATH + }); } handlePermalink(e) { e.preventDefault(); diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 1aa4a555f..26b392aa1 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -7,7 +7,6 @@ import UserProfile from './user_profile.jsx'; import UserStore from 'stores/user_store.jsx'; import * as TextFormatting from 'utils/text_formatting.jsx'; import * as Utils from 'utils/utils.jsx'; -import * as Emoji from 'utils/emoticons.jsx'; import FileAttachmentList from './file_attachment_list.jsx'; import twemoji from 'twemoji'; import PostBodyAdditionalContent from './post_body_additional_content.jsx'; @@ -30,9 +29,9 @@ export default class RhsRootPost extends React.Component { } parseEmojis() { twemoji.parse(ReactDOM.findDOMNode(this), { - className: 'emoji twemoji', + className: 'emoticon', base: '', - folder: Emoji.getImagePathForEmoticon() + folder: Constants.EMOJI_PATH }); } handlePermalink(e) { diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 859348c73..28c9df60b 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -605,5 +605,6 @@ export default { MIN_PASSWORD_LENGTH: 5, MAX_PASSWORD_LENGTH: 50, TIME_SINCE_UPDATE_INTERVAL: 30000, - MIN_HASHTAG_LINK_LENGTH: 3 + MIN_HASHTAG_LINK_LENGTH: 3, + EMOJI_PATH: '/static/emoji' }; -- cgit v1.2.3-1-g7c22