Skip to content

Commit

Permalink
Added trigger method according to issue #20 and pull #21
Browse files Browse the repository at this point in the history
  • Loading branch information
mervick committed May 17, 2016
1 parent f30a705 commit 79d362e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
11 changes: 9 additions & 2 deletions dist/emojionearea.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* EmojioneArea v3.0.1
* EmojioneArea v3.0.2
* https://github.com/mervick/emojionearea
* Copyright Andrey Izman and other contributors
* Released under the MIT license
* Date: 2016-05-08T16:03Z
* Date: 2016-05-17T17:09Z
*/
(function(document, window, $) {
'use strict';
Expand Down Expand Up @@ -939,6 +939,13 @@
return this;
};

EmojioneArea.prototype.trigger = function() {
var args = slice.call(arguments),
call_args = [this].concat(args.slice(0,1));
call_args.push(args.slice(1));
return trigger.apply(this, call_args);
};

EmojioneArea.prototype.setText = function (str) {
var self = this;
emojioneReady(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/emojionearea.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/emojionearea.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emojionearea",
"version": "3.0.1",
"version": "3.0.2",
"description": "WYSIWYG-like EmojiOne Converter / Picker Plugin for jQuery",
"main": "dist/emojionearea.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/emojionearea.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ define([
'prototype/var/EmojioneArea',
'prototype/on',
'prototype/off',
'prototype/trigger',
'prototype/setText',
'prototype/getText',
'prototype/showPicker',
Expand Down
13 changes: 13 additions & 0 deletions src/prototype/trigger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
define([
'var/slice',
'function/trigger',
'prototype/var/EmojioneArea'
],
function(slice, trigger, EmojioneArea) {
EmojioneArea.prototype.trigger = function() {
var args = slice.call(arguments),
call_args = [this].concat(args.slice(0,1));
call_args.push(args.slice(1));
return trigger.apply(this, call_args);
};
});

0 comments on commit 79d362e

Please sign in to comment.