Skip to content

Commit

Permalink
chore: build dist for 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuwoo.choi committed Apr 13, 2018
1 parent 0cd31ce commit fd82394
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
35 changes: 34 additions & 1 deletion dist/tui-gesture-reader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* tui-gesture-reader.js
* @version 2.0.0
* @version 2.1.0
* @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
* @license MIT
*/
Expand Down Expand Up @@ -73,6 +73,8 @@ return /******/ (function(modules) { // webpackBootstrap
var LongTab = __webpack_require__(3);
var DoubleClick = __webpack_require__(4);

var hostnameSent = false;

/**
* To find out it's flick or click or nothing from event datas.
* @class Reader
Expand All @@ -84,6 +86,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {number} [options.flickRange] - (Flick) If not in time, compare move distance with flick ragne.
* @param {number} [options.longTabTerm] - (LongTab) Term for checking longtab
* @param {number} [options.minDist] - (Flick, LongTab) Minimum distance for check available movement.
* @param {boolean} [options.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false.
* @example
* var GestureReader = tui.GestureReader; // or require('tui-gesture-reader');
* var instance = new GestureReader({
Expand All @@ -92,6 +95,10 @@ return /******/ (function(modules) { // webpackBootstrap
*/
var Reader = snippet.defineClass(/** @lends Reader.prototype */{
init: function(options) {
options = snippet.extend({
usageStatistics: true
}, options);

if (options.type === 'flick') {
snippet.extend(this, Flick);
} else if (options.type === 'longtab') {
Expand All @@ -100,9 +107,35 @@ return /******/ (function(modules) { // webpackBootstrap
snippet.extend(this, DoubleClick);
}
this.initialize(options);

if (options.usageStatistics) {
sendHostname();
}
}
});

/**
* send hostname
* @ignore
*/
function sendHostname() {
var hostname = location.hostname;

if (hostnameSent) {
return;
}
hostnameSent = true;

snippet.imagePing('https://www.google-analytics.com/collect', {
v: 1,
t: 'event',
tid: 'UA-115377265-9',
cid: hostname,
dp: hostname,
dh: 'gesture-reader'
});
}

module.exports = Reader;


Expand Down
4 changes: 2 additions & 2 deletions dist/tui-gesture-reader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd82394

Please sign in to comment.