Skip to content

Commit

Permalink
nodejs 에서 실행시 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
blaxk committed Oct 8, 2018
1 parent 41019b2 commit d153572
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 174 deletions.
4 changes: 2 additions & 2 deletions dist/ixSnack.min.js

Large diffs are not rendered by default.

186 changes: 94 additions & 92 deletions dist/ixSnack_0.5.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* ixsnack - Javascript Library (jQuery plugin)
* jQuery v1.8~ (http://jquery.com) + ixBand v1.0~ (http://ixband.com)
* @version v0.5.1 (1810041544)
* @version v0.5.2 (1810080948)
* The MIT License (MIT), http://ixsnack.com
*/
;(function (window) {
Expand Down Expand Up @@ -49,10 +49,10 @@
* Plugin에서 사용하는 공통기능
*/
ixSnack = {
VERSION: '0.5.1',
VERSION: '0.5.2',
MS_POINTER: ( navigator.pointerEnabled || navigator.msPointerEnabled ),
TRANSFORM: (function () {
if ( !($B.ua.MSIE && $B.ua.DOC_MODE_IE10_LT) ) {
if ( SUPPORT_WINDOW && !($B.ua.MSIE && $B.ua.DOC_MODE_IE10_LT) ) {
var prefixes = 'transform WebkitTransform'.split( ' ' );
for ( var i = 0; i < prefixes.length; ++i ) {
if ( document.createElement('div').style[prefixes[i]] !== undefined ) {
Expand Down Expand Up @@ -327,95 +327,97 @@
};


$.fn.extend({
ixOptions: function ( val1 ) {
//setter
if ( $B.object.is(val1) ) {
return this.each( function ( idx, el ) {
var optionData = $( el ).attr( 'data-ix-options' ),
value = ( optionData )? ixSnack.objToOptions( optionData, val1 ) : ixSnack.objToOptions( '', val1 );

$( el ).attr( 'data-ix-options', value ).addClass( 'ix-options-apply' );
});
} else {
var options = ixSnack.parseOptions( this.attr('data-ix-options') );

if ( $B.string.is(val1) ) {
var option = options[$B.string.camelCase(val1)];
if ( option ) {
if ( $B.array.is(option) ) {
options = [
( option[0].unit )? option[0].value + option[0].unit : option[0].value,
( option[1].unit )? option[1].value + option[1].unit : option[1].value
];
} else {
options = ( option.unit )? option.value + option.unit : option.value;
}
} else {
options = undefined;
}
}

return options
}
},

ixSlideMax: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slide-max', ixSnack.SlideMax, val1, val2 );
},

ixSlideLite: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slide-lite', ixSnack.SlideLite, val1, val2 );
},

ixOverlayList: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'overlay-list', ixSnack.OverlayList, val1, val2 );
},

ixRangeSlider: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'range-slider', ixSnack.RangeSlider, val1, val2 );
},

ixSlider: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slider', ixSnack.Slider, val1, val2 );
},

ixRatioSize: function ( value ) {
if ( value && $B.object.is(value) ) this.ixOptions( value );

return this.each( function ( idx, el ) {
var $el = $( el ),
options = ixSnack.parseOptions( $el.attr('data-ix-options') ),
axis = ( options.axis )? options.axis.value : 'horizontal',
controlType = ( options.controlType )? options.controlType.value : 'style',
width, height, apply = false;

if ( options.ratio ) {
if ( axis === 'horizontal' ) {
width = $el.width();
height = width * ( options.ratio[1].value / options.ratio[0].value );

if ( width ) {
if ( controlType === 'style' || controlType === 'all' ) $el.css( 'height', height + 'px' );
if ( controlType === 'attr' || controlType === 'all' ) $el.attr( 'height', height );
apply = true;
}
} else {
height = $el.height();
width = height * ( options.ratio[0].value / options.ratio[1].value );

if ( height ) {
if ( controlType === 'style' || controlType === 'all' ) $el.css( 'width', width + 'px' );
if ( controlType === 'attr' || controlType === 'all' ) $el.attr( 'width', width );
apply = true;
}
}

if ( apply ) $el.addClass( 'ix-ratio-size-apply' );
}
});
}
});
if ( $.fn && typeof $.fn.extend === 'function' ) {
$.fn.extend({
ixOptions: function ( val1 ) {
//setter
if ( $B.object.is(val1) ) {
return this.each( function ( idx, el ) {
var optionData = $( el ).attr( 'data-ix-options' ),
value = ( optionData )? ixSnack.objToOptions( optionData, val1 ) : ixSnack.objToOptions( '', val1 );

$( el ).attr( 'data-ix-options', value ).addClass( 'ix-options-apply' );
});
} else {
var options = ixSnack.parseOptions( this.attr('data-ix-options') );

if ( $B.string.is(val1) ) {
var option = options[$B.string.camelCase(val1)];
if ( option ) {
if ( $B.array.is(option) ) {
options = [
( option[0].unit )? option[0].value + option[0].unit : option[0].value,
( option[1].unit )? option[1].value + option[1].unit : option[1].value
];
} else {
options = ( option.unit )? option.value + option.unit : option.value;
}
} else {
options = undefined;
}
}

return options
}
},

ixSlideMax: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slide-max', ixSnack.SlideMax, val1, val2 );
},

ixSlideLite: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slide-lite', ixSnack.SlideLite, val1, val2 );
},

ixOverlayList: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'overlay-list', ixSnack.OverlayList, val1, val2 );
},

ixRangeSlider: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'range-slider', ixSnack.RangeSlider, val1, val2 );
},

ixSlider: function ( val1, val2 ) {
return ixSnack.setPlugin( this, 'slider', ixSnack.Slider, val1, val2 );
},

ixRatioSize: function ( value ) {
if ( value && $B.object.is(value) ) this.ixOptions( value );

return this.each( function ( idx, el ) {
var $el = $( el ),
options = ixSnack.parseOptions( $el.attr('data-ix-options') ),
axis = ( options.axis )? options.axis.value : 'horizontal',
controlType = ( options.controlType )? options.controlType.value : 'style',
width, height, apply = false;

if ( options.ratio ) {
if ( axis === 'horizontal' ) {
width = $el.width();
height = width * ( options.ratio[1].value / options.ratio[0].value );

if ( width ) {
if ( controlType === 'style' || controlType === 'all' ) $el.css( 'height', height + 'px' );
if ( controlType === 'attr' || controlType === 'all' ) $el.attr( 'height', height );
apply = true;
}
} else {
height = $el.height();
width = height * ( options.ratio[0].value / options.ratio[1].value );

if ( height ) {
if ( controlType === 'style' || controlType === 'all' ) $el.css( 'width', width + 'px' );
if ( controlType === 'attr' || controlType === 'all' ) $el.attr( 'width', width );
apply = true;
}
}

if ( apply ) $el.addClass( 'ix-ratio-size-apply' );
}
});
}
});
}


ixSnack.BaseClass = $B.Class.extend({
Expand Down
4 changes: 2 additions & 2 deletions dist/ixSnack_0.5.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ixsnack",
"version": "0.5.1",
"version": "0.5.2",
"fileName": "ixSnack_0.5",
"description": "Javascript UI Library (slide, slider, carousel ...)",
"main": "dist/ixSnack_0.5.js",
"dependencies": {
"ixband": "^1.2.1",
"jquery": "^1.11.0"
"jquery": "^3.3.1"
},
"devDependencies": {
"grunt": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ixSnack = {
VERSION: '',
MS_POINTER: ( navigator.pointerEnabled || navigator.msPointerEnabled ),
TRANSFORM: (function () {
if ( !($B.ua.MSIE && $B.ua.DOC_MODE_IE10_LT) ) {
if ( SUPPORT_WINDOW && !($B.ua.MSIE && $B.ua.DOC_MODE_IE10_LT) ) {
var prefixes = 'transform WebkitTransform'.split( ' ' );
for ( var i = 0; i < prefixes.length; ++i ) {
if ( document.createElement('div').style[prefixes[i]] !== undefined ) {
Expand Down
Loading

0 comments on commit d153572

Please sign in to comment.