File tree Expand file tree Collapse file tree 5 files changed +19
-7
lines changed
Expand file tree Collapse file tree 5 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1+ ### 0.1.3 / 2019-02-07 ###
2+
3+ * update ` self ` check (truth and false) on every loop iteration
4+ * fix property value and property name detection
5+
16### 0.1.2 / 2019-02-07 ###
27
38* Add support for triggers
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ input[type=text] {
5151
5252.sidemenu {
5353 position : absolute;
54- // minus height of header;
54+ /* minus height of header; */
5555 height : calc (100% - 56px );
5656 top : 56px ;
5757 left : -360px ;
Original file line number Diff line number Diff line change 6767 var target = el ;
6868 isSelf = true ;
6969 } else {
70+ isSelf = false ;
7071 var target = paramValues [ 0 ] ;
7172 }
7273
74+ var propertyName = propertyOrEventType ;
7375 var propertyValue ;
74- if ( action !== 'remove' || action !== ' reset') {
75- var index = this_ . _getPropertyValueIndex ( propertyOrEventType , isSelf )
76+ if ( action !== 'reset' ) {
77+ var index = this_ . _getPropertyValueIndex ( propertyOrEventType , isSelf ) ;
7678 // join space containing values that might have been split.
77- propertyValue = paramValues . splice ( index ) . join ( ' ' )
79+ propertyValue = paramValues . slice ( index ) . join ( ' ' ) ;
80+ if ( propertyOrEventType === 'attribute' ) {
81+ propertyName = paramValues [ index - 1 ] ;
82+ }
7883 }
7984
8085 var options = {
8388 sourceElement : el ,
8489 propertyOrEventType : propertyOrEventType ,
8590 propertyValue : propertyValue ,
86- propertyName : propertyOrEventType === 'attribute' ? paramValues [ 1 ] : propertyOrEventType
91+ propertyName : propertyName
8792 }
8893
8994 el . addEventListener ( eventType , function ( e ) {
141146 }
142147
143148 NoJS . prototype . _getPropertyValueIndex = function ( propertyOrEventType , isSelf ) {
149+ // if props type is attribute, the signature takes the form
150+ // on-[evtType]-[action]-attribute = "target propertyName propertyValue"
144151 var index = propertyOrEventType === 'attribute' ? 2 : 1 ;
145152 return isSelf ? index - 1 : index ;
146153 }
Original file line number Diff line number Diff line change 11{
22 "name" : " nojs" ,
3- "version" : " 0.1.2 " ,
3+ "version" : " 0.1.3 " ,
44 "description" : " Library that helps minimize js you have to write" ,
55 "main" : " no.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments