How to use setOptions method in stryker-parent

Best JavaScript code snippet using stryker-parent

options.js

Source:options.js Github

copy

Full Screen

...22 ll = new window.LeaderLine(document.getElementById('elm1'), document.getElementById('elm2'));23 beforeDone();24 });25 }26 describe('setOptions()', function() {27 beforeEach(loadBefore);28 it('setValidId()', function() {29 var props = window.insProps[ll._id];30 // valid ID31 traceLog.clear();32 ll.path = 'straight';33 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');34 expect(props.options.path).toBe(PATH_STRAIGHT);35 expect(ll.path).toBe('straight');36 // invalid ID37 traceLog.clear();38 ll.path = 'straightx';39 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');40 expect(props.options.path).toBe(PATH_STRAIGHT);41 expect(ll.path).toBe('straight');42 // same ID43 traceLog.clear();44 ll.path = 'straight';45 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');46 expect(props.options.path).toBe(PATH_STRAIGHT);47 expect(ll.path).toBe('straight');48 // 'auto', getCurOption49 ll.endSocket = 'bottom';50 expect(props.options.socketSE[1]).toBe(SOCKET_BOTTOM);51 expect(ll.endSocket).toBe('bottom');52 traceLog.clear();53 ll.endSocket = 'auto';54 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');55 expect(props.options.socketSE[1] == null).toBe(true);56 expect(ll.endSocket).toBe('auto');57 // invalid 'auto'58 traceLog.clear();59 ll.path = 'auto';60 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');61 expect(props.options.path).toBe(PATH_STRAIGHT);62 expect(ll.path).toBe('straight');63 // invalid 'auto', getCurOption64 ll.startPlug = 'behind';65 expect(props.options.plugSE[0]).toBe('behind');66 expect(ll.startPlug).toBe('behind');67 traceLog.clear();68 ll.startPlug = 'auto';69 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');70 expect(props.options.plugSE[0]).toBe('behind');71 expect(ll.startPlug).toBe('behind');72 pageDone();73 });74 it('setValidType()', function() {75 var props = window.insProps[ll._id];76 // valid value77 traceLog.clear();78 ll.startPlugColor = 'red';79 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');80 expect(props.options.plugColorSE[0]).toBe('red');81 expect(ll.startPlugColor).toBe('red');82 // invalid value83 traceLog.clear();84 ll.startPlugColor = 0;85 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');86 expect(props.options.plugColorSE[0]).toBe('red');87 expect(ll.startPlugColor).toBe('red');88 // valid value (additional check)89 traceLog.clear();90 ll.startPlugOutlineSize = 2;91 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');92 expect(props.options.plugOutlineSizeSE[0]).toBe(2);93 expect(ll.startPlugOutlineSize).toBe(2);94 // invalid value (additional check)95 traceLog.clear();96 ll.startPlugOutlineSize = 0.5;97 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plugOutline');98 expect(props.options.plugOutlineSizeSE[0]).toBe(2);99 expect(ll.startPlugOutlineSize).toBe(2);100 // same value101 traceLog.clear();102 ll.startPlugColor = 'red';103 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');104 expect(props.options.plugColorSE[0]).toBe('red');105 expect(ll.startPlugColor).toBe('red');106 // trim -> same value107 traceLog.clear();108 ll.startPlugColor = ' red ';109 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');110 expect(props.options.plugColorSE[0]).toBe('red');111 expect(ll.startPlugColor).toBe('red');112 // trim *color*113 traceLog.clear();114 ll.setOptions({115 color: ' red ',116 endPlugColor: ' green ',117 outlineColor: ' yellow ',118 startPlugOutlineColor: ' pink '119 });120 expect(props.options.lineColor).toBe('red');121 expect(props.options.plugColorSE[1]).toBe('green');122 expect(props.options.lineOutlineColor).toBe('yellow');123 expect(props.options.plugOutlineColorSE[0]).toBe('pink');124 expect(ll.color).toBe('red');125 expect(ll.endPlugColor).toBe('green');126 expect(ll.outlineColor).toBe('yellow');127 expect(ll.startPlugOutlineColor).toBe('pink');128 // 'auto'129 traceLog.clear();130 ll.startPlugColor = 'auto';131 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');132 expect(props.options.plugColorSE[0] == null).toBe(true);133 expect(ll.startPlugColor).toBe('auto');134 // invalid 'auto'135 ll.size = 12;136 expect(props.options.lineSize).toBe(12);137 expect(ll.size).toBe(12);138 traceLog.clear();139 ll.size = 'auto';140 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.line');141 expect(props.options.lineSize).toBe(12);142 expect(ll.size).toBe(12);143 // valid value (specified type)144 traceLog.clear();145 ll.startPlugSize = 2; // number146 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');147 expect(props.options.plugSizeSE[0]).toBe(2);148 expect(ll.startPlugSize).toBe(2);149 // invalid value (specified type)150 traceLog.clear();151 ll.startPlugSize = '3'; // string152 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');153 expect(props.options.plugSizeSE[0]).toBe(2);154 expect(ll.startPlugSize).toBe(2);155 // invalid number (NaN)156 traceLog.clear();157 ll.startPlugSize = NaN;158 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');159 expect(props.options.plugSizeSE[0]).toBe(2);160 expect(ll.startPlugSize).toBe(2);161 // invalid number (Infinity)162 traceLog.clear();163 ll.startPlugSize = Infinity;164 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');165 expect(props.options.plugSizeSE[0]).toBe(2);166 expect(ll.startPlugSize).toBe(2);167 // valid value (specified type)168 traceLog.clear();169 ll.startPlugSize = 3; // number170 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');171 expect(props.options.plugSizeSE[0]).toBe(3);172 expect(ll.startPlugSize).toBe(3);173 pageDone();174 });175 it('anchorSE are checked', function() {176 var props = window.insProps[ll._id], value;177 // no update178 value = props.options.anchorSE[0];179 traceLog.clear();180 ll.start = value;181 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');182 expect(props.options.anchorSE[0]).toBe(value);183 expect(ll.start).toBe(value);184 // Change to element in iframe, `baseWindow` is not changed185 ll.setOptions({186 start: document.getElementById('elm2'),187 end: document.getElementById('elm3')188 });189 expect(props.baseWindow).toBe(window);190 traceLog.clear();191 ll.end = document.getElementById('iframe1').contentDocument.getElementById('elm2');192 expect(traceLog.log).not.toContain('<bindWindow>');193 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');194 expect(props.baseWindow).toBe(window);195 // Change to element in iframe, `baseWindow` is changed196 traceLog.clear();197 ll.start = document.getElementById('iframe1').contentDocument.getElementById('elm1');198 expect(traceLog.log).toContain('<bindWindow>');199 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');200 expect(props.baseWindow).toBe(document.getElementById('iframe1').contentWindow);201 // SVG202 ll.start = document.getElementById('rect1');203 expect(props.options.anchorSE[0]).toBe(document.getElementById('rect1'));204 // invalid element205 ll.setOptions({206 start: document.getElementById('elm2'),207 end: document.getElementById('elm3')208 });209 expect(function() {210 ll.start = ll.end;211 }).toThrow();212 expect(function() {213 ll = new window.LeaderLine(document.getElementById('elm1'));214 }).toThrow();215 expect(function() {216 ll = new window.LeaderLine(5, document.getElementById('elm2'));217 }).toThrow();218 pageDone();219 });220 it('socketGravitySE are checked', function() {221 var props = window.insProps[ll._id];222 // array223 traceLog.clear();224 ll.startSocketGravity = [1, 2];225 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');226 expect(props.options.socketGravitySE[0]).toEqual([1, 2]);227 expect(ll.startSocketGravity).toEqual([1, 2]);228 // same array229 traceLog.clear();230 ll.startSocketGravity = [1, 2];231 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');232 expect(props.options.socketGravitySE[0]).toEqual([1, 2]);233 expect(ll.startSocketGravity).toEqual([1, 2]);234 // invalid array235 traceLog.clear();236 ll.startSocketGravity = [1, 'a'];237 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');238 expect(props.options.socketGravitySE[0]).toEqual([1, 2]);239 expect(ll.startSocketGravity).toEqual([1, 2]);240 // array length 1241 traceLog.clear();242 ll.startSocketGravity = [1, 2, 3]; // `3` is ignored and same array243 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');244 expect(props.options.socketGravitySE[0]).toEqual([1, 2]);245 expect(ll.startSocketGravity).toEqual([1, 2]);246 // array length 2247 traceLog.clear();248 ll.startSocketGravity = [4, 2, 3]; // `3` is ignored249 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');250 expect(props.options.socketGravitySE[0]).toEqual([4, 2]);251 expect(ll.startSocketGravity).toEqual([4, 2]);252 // 'auto'253 traceLog.clear();254 ll.startSocketGravity = 'auto';255 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');256 expect(props.options.socketGravitySE[0] == null).toBe(true);257 expect(ll.startSocketGravity).toBe('auto');258 // same 'auto'259 traceLog.clear();260 ll.startSocketGravity = 'auto';261 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');262 expect(props.options.socketGravitySE[0] == null).toBe(true);263 expect(ll.startSocketGravity).toBe('auto');264 // invalid value265 traceLog.clear();266 ll.startSocketGravity = -1;267 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');268 expect(props.options.socketGravitySE[0] == null).toBe(true);269 expect(ll.startSocketGravity).toBe('auto');270 // valid value271 traceLog.clear();272 ll.startSocketGravity = 0;273 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');274 expect(props.options.socketGravitySE[0]).toBe(0);275 expect(ll.startSocketGravity).toBe(0);276 // same value277 traceLog.clear();278 ll.startSocketGravity = 0;279 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.position');280 expect(props.options.socketGravitySE[0]).toBe(0);281 expect(ll.startSocketGravity).toBe(0);282 pageDone();283 });284 it('needs.line is affected by options', function() {285 // Change to element in iframe, `baseWindow` is not changed286 ll.setOptions({287 start: document.getElementById('elm2'),288 end: document.getElementById('elm3')289 });290 traceLog.clear();291 ll.end = document.getElementById('iframe1').contentDocument.getElementById('elm2');292 expect(traceLog.log).not.toContain('<bindWindow>');293 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.line');294 // Change to element in iframe, `baseWindow` is changed295 traceLog.clear();296 ll.start = document.getElementById('iframe1').contentDocument.getElementById('elm1');297 expect(traceLog.log).toContain('<bindWindow>');298 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.line');299 // lineColor300 traceLog.clear();301 ll.color = 'red';302 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.line');303 // lineSize304 traceLog.clear();305 ll.size = 2;306 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.line');307 // lineSize invalid308 traceLog.clear();309 ll.size = 0;310 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.line');311 pageDone();312 });313 it('needs.plug is affected by options', function() {314 // Change to element in iframe, `baseWindow` is not changed315 ll.setOptions({316 start: document.getElementById('elm2'),317 end: document.getElementById('elm3')318 });319 traceLog.clear();320 ll.end = document.getElementById('iframe1').contentDocument.getElementById('elm2');321 expect(traceLog.log).not.toContain('<bindWindow>');322 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');323 // Change to element in iframe, `baseWindow` is changed324 traceLog.clear();325 ll.start = document.getElementById('iframe1').contentDocument.getElementById('elm1');326 expect(traceLog.log).toContain('<bindWindow>');327 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');328 // plugSE329 traceLog.clear();330 ll.startPlug = 'arrow2';331 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');332 traceLog.clear();333 ll.endPlug = 'square';334 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');335 // plugColorSE336 traceLog.clear();337 ll.startPlugColor = 'red';338 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');339 traceLog.clear();340 ll.endPlugColor = 'blue';341 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');342 // plugSizeSE343 traceLog.clear();344 ll.startPlugSize = 1.5;345 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');346 traceLog.clear();347 ll.endPlugSize = 2;348 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');349 // plugSizeSE invalid350 traceLog.clear();351 ll.startPlugSize = 0;352 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');353 traceLog.clear();354 ll.endPlugSize = 0;355 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plug');356 pageDone();357 });358 it('needs.lineOutline is affected by options', function() {359 // Change to element in iframe, `baseWindow` is not changed360 ll.setOptions({361 start: document.getElementById('elm2'),362 end: document.getElementById('elm3')363 });364 traceLog.clear();365 ll.end = document.getElementById('iframe1').contentDocument.getElementById('elm2');366 expect(traceLog.log).not.toContain('<bindWindow>');367 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.lineOutline');368 // Change to element in iframe, `baseWindow` is changed369 traceLog.clear();370 ll.start = document.getElementById('iframe1').contentDocument.getElementById('elm1');371 expect(traceLog.log).toContain('<bindWindow>');372 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');373 // lineOutlineEnabled374 traceLog.clear();375 ll.outline = true;376 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');377 // lineOutlineColor378 traceLog.clear();379 ll.outlineColor = 'red';380 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');381 // lineOutlineSize382 traceLog.clear();383 ll.outlineSize = 0.1;384 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');385 // lineOutlineSize invalid386 traceLog.clear();387 ll.outlineSize = 0.5;388 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.lineOutline');389 pageDone();390 });391 it('needs.plugOutline is affected by options', function() {392 // Change to element in iframe, `baseWindow` is not changed393 ll.setOptions({394 start: document.getElementById('elm2'),395 end: document.getElementById('elm3')396 });397 traceLog.clear();398 ll.end = document.getElementById('iframe1').contentDocument.getElementById('elm2');399 expect(traceLog.log).not.toContain('<bindWindow>');400 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plugOutline');401 // Change to element in iframe, `baseWindow` is changed402 traceLog.clear();403 ll.start = document.getElementById('iframe1').contentDocument.getElementById('elm1');404 expect(traceLog.log).toContain('<bindWindow>');405 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');406 // plugOutlineEnabledSE407 traceLog.clear();408 ll.startPlugOutline = true;409 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');410 traceLog.clear();411 ll.endPlugOutline = true;412 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');413 // plugOutlineColorSE414 traceLog.clear();415 ll.startPlugOutlineColor = 'red';416 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');417 traceLog.clear();418 ll.endPlugOutlineColor = 'blue';419 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');420 // plugOutlineSizeSE421 traceLog.clear();422 ll.startPlugOutlineSize = 1.2;423 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');424 // plugOutlineSizeSE invalid425 traceLog.clear();426 ll.endPlugOutlineSize = 0.9;427 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.plugOutline');428 pageDone();429 });430 it('needs.position is affected by options', function() {431 // anchorSE432 traceLog.clear();433 ll.start = document.getElementById('elm3');434 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');435 // path436 traceLog.clear();437 ll.path = 'straight';438 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');439 // socketSE440 traceLog.clear();441 ll.startSocket = 'bottom';442 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');443 traceLog.clear();444 ll.endSocket = 'bottom';445 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.position');446 // socketGravitySE was already tested447 pageDone();448 });449 });450 describe('update()', function() {451 beforeEach(loadBefore);452 it('needs.line and updated.line affects calling update*', function() {453 traceLog.clear();454 ll.color = 'red';455 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.line');456 expect(traceLog.getTaggedLog('update')).toContain('updated.line');457 expect(traceLog.log).toContainAll([458 '<updateLine>',459 '<updatePlug>', '<updateLineOutline>', '<updatePlugOutline>', '<updateFaces>', '<updatePosition>'460 ]);461 traceLog.clear();462 ll.color = 'red'; // same value463 expect(traceLog.getTaggedLog('setOptions')).not.toContain('needs.line');464 expect(traceLog.getTaggedLog('update')).not.toContain('updated.line');465 expect(traceLog.log).toNotContainAny([466 '<updateLine>',467 '<updatePlug>', '<updateLineOutline>', '<updatePlugOutline>', '<updateFaces>', '<updatePosition>'468 ]);469 pageDone();470 });471 it('needs.plug and updated.plug affects calling update*', function() {472 traceLog.clear();473 ll.endPlugColor = 'red';474 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');475 expect(traceLog.getTaggedLog('update')).toContain('updated.plug');476 expect(traceLog.log).toContainAll([477 '<updatePlug>',478 '<updatePlugOutline>', '<updateFaces>', '<updatePosition>'479 ]);480 ll.color = 'red';481 traceLog.clear();482 ll.endPlugColor = 'auto'; // update option, but same stats483 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plug');484 expect(traceLog.getTaggedLog('update')).not.toContain('updated.plug');485 expect(traceLog.log).toContain('<updatePlug>');486 expect(traceLog.log).toNotContainAny([487 '<updatePlugOutline>', '<updateFaces>', '<updatePosition>'488 ]);489 pageDone();490 });491 it('needs.lineOutline and updated.lineOutline affects calling update*', function() {492 traceLog.clear();493 ll.outline = true;494 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');495 expect(traceLog.getTaggedLog('update')).toContain('updated.lineOutline');496 expect(traceLog.log).toContainAll([497 '<updateLineOutline>',498 '<updatePlugOutline>', '<updateFaces>'499 ]);500 ll.outlineColor = 'rgba(255, 0, 0, 0.5)'; // to enable lineOutline_colorTra501 traceLog.clear();502 ll.setOptions({size: 10, outlineSize: 0.4}); // update option, but same stats503 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.lineOutline');504 // '<updatePlugOutline>' and '<updateFaces>' are called by updated.line505 expect(traceLog.getTaggedLog('update')).not.toContain('updated.lineOutline');506 expect(traceLog.log).toContain('<updateLineOutline>');507 pageDone();508 });509 it('needs.plugOutline and updated.plugOutline affects calling update*', function() {510 traceLog.clear();511 ll.endPlugOutline = true;512 expect(traceLog.getTaggedLog('setOptions')).toContain('needs.plugOutline');513 expect(traceLog.getTaggedLog('update')).toContain('updated.plugOutline');514 expect(traceLog.log).toContainAll([515 '<updatePlugOutline>',516 '<updateFaces>'...

Full Screen

Full Screen

jeuqry.jellySlider-1.0 2.js

Source:jeuqry.jellySlider-1.0 2.js Github

copy

Full Screen

1(function () {2 $.fn.jellySlider2 = function (options) {3 this.each(function () {4 var el = $(this);5 var _ = {6 this: el,7 list: el.find('.jelly-list2'),8 slides: el.find('.jelly-slide2'),9 slidesLength: el.find('.jelly-slide2').length,10 currentSlide: 0,11 currentPosition: 0,12 movePosition: el.outerWidth(),13 options: {14 arrows: true,15 navigations: true,16 loop: false,17 speed: 500,18 fade: false,19 drag: false,20 vertical: false,21 view: 1,22 move: 1,23 margin: 0,24 },25 mouseEvent: null,26 btnPrev: el.find('.jelly-prev2').length ? el.find('.jelly-prev2') : null,27 btnNext: el.find('.jelly-next2').length ? el.find('.jelly-next2') : null,28 setOptions: null,29 init: function () {30 _.setOptions = $.extend({}, _.options, options);31 _.this.addClass('jelly-activated');32 _.list.css({33 transition: _.setOptions.speed + 'ms',34 });35 $(_.slides[_.currentSlide]).addClass('jelly-active2');36 }37 };38 _.init();39 // 함수40 var jelly = {41 init: function () {42 this.setIndex(_);43 this.setWidth(_);44 this.setArrows(_);45 this.loop(_);46 this.fade(_);47 this.dragAble(_);48 this.multipleSlider(_);49 },50 setIndex: function (_) {51 _.slides.each(function (i) {52 $(this).attr('data-jelly-index', i);53 })54 },55 setWidth: function (_) {56 _.slides.css({57 width: _.this.outerWidth()58 });59 var slidesLength = _.setOptions.loop ? _.slidesLength + 2 : _.slidesLength;60 var listWidth = _.this.outerWidth() * slidesLength;61 if (_.setOptions.view > 1) {62 _.movePosition = (((_.this.outerWidth() - (_.setOptions.margin * (_.setOptions.view - 1)))) / _.setOptions.view) * _.setOptions.move + (_.setOptions.margin * _.setOptions.move);63 if (_.setOptions.loop) {64 if (!_.setOptions.move % 2) {65 slidesLength = (_.slidesLength + (_.setOptions.view - 1) * 2);66 } else {67 slidesLength = _.slidesLength;68 }69 } else {70 slidesLength = _.slidesLength;71 }72 listWidth = _.movePosition * slidesLength;73 }74 _.list.css({75 width: listWidth,76 });77 },78 setArrows: function (_) {79 if (_.setOptions.arrows) {80 if (_.slidesLength > 1) {81 var addPrev = _.this.append('<button type="button" class="jelly-prev2">이전</button>');82 var addNext = _.this.append('<button type="button" class="jelly-next2">다음</button>');83 _.btnPrev = addPrev.find('.jelly-prev2');84 _.btnNext = addNext.find('.jelly-next2');85 }86 _.btnNext.off('click.nextClick').on('click.nextClick', function (e) {87 jelly.moveNext();88 });89 _.btnPrev.off('click.prevClick').on('click.prevClick', function () {90 jelly.movePrev();91 });92 }93 },94 moveNext: function () {95 if (_.setOptions.view > 1) {96 _.movePosition = (((_.this.outerWidth() - (_.setOptions.margin * (_.setOptions.view - 1)))) / _.setOptions.view) * _.setOptions.move + (_.setOptions.margin * _.setOptions.move);97 }98 if (_.setOptions.loop) {99 _.slidesLength = _.this.find('.jelly-slide2').length;100 if (_.currentSlide <= _.slidesLength - 2) {101 _.currentSlide += 1;102 _.currentPosition = _.currentPosition + _.movePosition;103 _.list.css({104 transition: _.setOptions.speed + 'ms',105 transform: 'translateX(-' + _.currentPosition + 'px)'106 });107 jelly.checkActive(_, _.currentSlide);108 if (_.currentPosition >= _.list.outerWidth() - _.this.outerWidth() - _.setOptions.margin) {109 moveFirst();110 }111 }112 } else {113 if (_.currentSlide < _.slidesLength - 1) {114 _.currentSlide += 1;115 _.currentPosition = _.currentPosition + _.movePosition;116 _.list.css({117 transition: _.setOptions.speed + 'ms',118 transform: 'translateX(-' + _.currentPosition + 'px)'119 });120 }121 jelly.checkActive(_, _.currentSlide);122 }123 function moveFirst() {124 setTimeout(() => {125 _.currentSlide = 1;126 if (_.setOptions.view > 1) {127 _.currentPosition = _.movePosition * (_.setOptions.view - 2);128 } else {129 _.currentPosition = _.movePosition;130 }131 _.list.css({132 transition: 'none',133 transform: 'translateX(-' + _.currentPosition + 'px)'134 });135 jelly.checkActive(_, _.currentSlide);136 }, _.setOptions.speed + 10);137 }138 },139 movePrev: function () {140 if (_.setOptions.view > 1) {141 _.movePosition = (((_.this.outerWidth() - (_.setOptions.margin * (_.setOptions.view - 1)))) / _.setOptions.view) * _.setOptions.move + (_.setOptions.margin * _.setOptions.move);142 }143 if (_.setOptions.loop) {144 _.slidesLength = _.this.find('.jelly-slide2').length;145 _.currentSlide += -1;146 _.currentPosition = _.currentPosition - _.movePosition;147 _.list.css({148 transition: _.setOptions.speed + 'ms',149 transform: 'translateX(-' + _.currentPosition + 'px)'150 });151 jelly.checkActive(_, _.currentSlide);152 if (_.currentPosition <= 0) {153 moveLast();154 }155 } else {156 if (_.currentSlide > 0) {157 _.currentSlide += -1;158 _.currentPosition = _.currentPosition - _.movePosition;159 _.list.css({160 transition: _.setOptions.speed + 'ms',161 transform: 'translateX(-' + _.currentPosition + 'px)'162 });163 }164 jelly.checkActive(_, _.currentSlide);165 }166 function moveLast() {167 setTimeout(() => {168 _.currentSlide = _.slidesLength - 2;169 if (_.setOptions.view > 1) {170 if (!_.setOptions.move % 0) {171 _.currentPosition = _.movePosition * (_.slidesLength + 2 - _.setOptions.view * 2);172 } else {173 _.currentPosition = _.movePosition * (_.slidesLength / _.setOptions.move);174 // 여기수정175 }176 } else {177 _.currentPosition = _.movePosition;178 }179 _.list.css({180 transition: 'none',181 transform: 'translateX(-' + _.currentPosition + 'px)'182 });183 jelly.checkActive(_, _.currentSlide);184 }, _.setOptions.speed + 10);185 }186 },187 loop: function (_) {188 if (_.setOptions.move > 1) {189 if (_.setOptions.margin) {190 _.movePosition = (_.this.outerWidth() - (_.setOptions.margin * (_.setOptions.view - 1))) / _.setOptions.view + _.setOptions.margin;191 } else {192 _.movePosition = (_.this.outerWidth() / _.setOptions.view);193 }194 }195 if (_.setOptions.loop) {196 _.currentSlide = 1;197 var cloneNumber = 1;198 var clonedAfter = _.slides.slice(0, cloneNumber);199 var clonedBefore = _.slides.slice(-cloneNumber);200 if (_.setOptions.view === 1) {201 clonedAfter.clone().appendTo(_.list).addClass('jelly-cloned');202 clonedBefore.clone().prependTo(_.list).addClass('jelly-cloned');203 } else {204 if (!_.setOptions.move % 2) {205 cloneNumber = _.setOptions.view - 1;206 } else {207 cloneNumber = _.setOptions.view;208 }209 clonedAfter = _.slides.slice(0, cloneNumber);210 clonedBefore = _.slides.slice(-cloneNumber);211 clonedAfter.clone().appendTo(_.list).addClass('jelly-cloned');212 clonedBefore.clone().prependTo(_.list).addClass('jelly-cloned');213 }214 _.currentPosition = _.movePosition;215 if (_.setOptions.view > 1) {216 if (!_.setOptions.move % 2) {217 _.currentPosition = _.movePosition * (_.setOptions.view - 1);218 } else {219 _.currentPosition = _.movePosition * _.setOptions.view;220 }221 }222 _.list.css({223 transition: 'none',224 transform: 'translateX(-' + _.currentPosition + 'px)'225 });226 }227 },228 checkActive: function (_, curr) {229 _.slides = _.list.find('.jelly-slide2');230 _.slides.each(function (i) {231 if (i === curr) {232 $(this).addClass('jelly-active2');233 } else {234 $(this).removeClass('jelly-active2');235 }236 });237 },238 fade: function (_) {239 if (_.setOptions.fade) {240 _.this.addClass('jelly-fade2');241 _.slides.css({242 transition: _.setOptions.speed + 'ms',243 })244 }245 },246 dragAble: function (_) {247 if (_.setOptions.drag) {248 var direction = "",249 oldx = 0;250 _.slides.off('mousedown.mouseDownEvent').on('mousedown.mouseDownEvent', function (e) {251 $(e.target).on('mousemove.detectDirection', function (e) {252 if (e.pageX < oldx) {253 direction = "left"254 } else if (e.pageX > oldx) {255 direction = "right"256 }257 oldx = e.pageX;258 })259 })260 .on('mouseup.mouseUpEvent', function (e) {261 if (direction === 'left') {262 jelly.moveNext(_);263 } else {264 jelly.movePrev(_);265 }266 $(e.target).off('mousemove.detectDirection');267 });268 }269 },270 multipleSlider: function (_) {271 if (_.setOptions.view <= 1) {272 _.setOptions.view = 1273 } else {274 var slideWidth,275 slideMargin;276 if (_.setOptions.margin) {277 slideMargin = _.setOptions.margin + 'px'278 slideWidth = (_.this.outerWidth() - (_.setOptions.margin * (_.setOptions.view - 1))) / _.setOptions.view;279 } else {280 slideWidth = _.this.outerWidth() / _.setOptions.view;281 }282 _.list.find('.jelly-slide2').css({283 width: slideWidth + 'px',284 marginRight: slideMargin,285 })286 }287 }288 }289 jelly.init();290 });291 }...

Full Screen

Full Screen

radioclicks.js

Source:radioclicks.js Github

copy

Full Screen

1//2// HipparchiaServer: an interface to a database of Greek and Latin texts3// Copyright: E Gunderson 2016-224// License: License: GNU GENERAL PUBLIC LICENSE 35// (see LICENSE in the top level directory of the distribution)6//7// the radio ui-click options8//9$('#headwordindexing_y').click( function(){10 setoptions('headwordindexing', 'yes'); $('#headwordindexingactive').show(); $('#headwordindexinginactive').hide();11});12$('#headwordindexing_n').click( function(){13 setoptions('headwordindexing', 'no'); $('#headwordindexinginactive').show(); $('#headwordindexingactive').hide();14});15$('#frequencyindexing_y').click( function(){16 setoptions('indexbyfrequency', 'yes'); $('#frequencyindexingactive').show(); $('#frequencyindexinginactive').hide();17});18$('#frequencyindexing_n').click( function(){19 setoptions('indexbyfrequency', 'no'); $('#frequencyindexinginactive').show(); $('#frequencyindexingactive').hide();20});21$('#onehit_y').click( function(){22 setoptions('onehit', 'yes'); $('#onehitistrue').show(); $('#onehitisfalse').hide();23});24$('#onehit_n').click( function(){25 setoptions('onehit', 'no'); $('#onehitisfalse').show(); $('#onehitistrue').hide();26});27$('#autofillinput').click( function(){28 setoptions('rawinputstyle', 'no'); $('#usingautoinput').show(); $('#usingrawinput').hide();29 hidemany(rawinputuielements);30});31$('#manualinput').click( function(){32 setoptions('rawinputstyle', 'yes'); $('#usingrawinput').show(); $('#usingautoinput').hide();33 let elementarray = Array().concat(levelsids, endpointlevelssids);34 hidemany(elementarray);35});36$('#includespuria').change(function() {37 if(this.checked) { setoptions('spuria', 'yes'); } else { setoptions('spuria', 'no'); }38 refreshselections();39 loadoptions();40 });41$('#includevaria').change(function() {42 if(this.checked) { setoptions('varia', 'yes'); } else { setoptions('varia', 'no'); }43 refreshselections();44 loadoptions();45 });46$('#includeincerta').change(function() {47 if(this.checked) { setoptions('incerta', 'yes'); } else { setoptions('incerta', 'no'); }48 refreshselections();49 loadoptions();50 });51$('#greekcorpus').change(function() {52 if(this.checked) { setoptions('greekcorpus', 'yes'); } else { setoptions('greekcorpus', 'no'); }53 refreshselections();54 loadoptions();55 });56$('#latincorpus').change(function() {57 if(this.checked) { setoptions('latincorpus', 'yes'); } else { setoptions('latincorpus', 'no'); }58 refreshselections();59 loadoptions();60 });61$('#inscriptioncorpus').change(function() {62 if(this.checked) { setoptions('inscriptioncorpus', 'yes'); } else { setoptions('inscriptioncorpus', 'no'); }63 refreshselections();64 loadoptions();65 });66$('#papyruscorpus').change(function() {67 if(this.checked) { setoptions('papyruscorpus', 'yes'); } else { setoptions('papyruscorpus', 'no'); }68 refreshselections();69 loadoptions();70 });71$('#christiancorpus').change(function() {72 if(this.checked) { setoptions('christiancorpus', 'yes'); } else { setoptions('christiancorpus', 'no'); }73 refreshselections();74 loadoptions();75 });76$('#sensesummary').change(function() {77 if(this.checked) { setoptions('sensesummary', 'yes'); } else { setoptions('sensesummary', 'no'); }78 refreshselections();79 loadoptions();80 });81$('#authorssummary').change(function() {82 if(this.checked) { setoptions('authorssummary', 'yes'); } else { setoptions('authorssummary', 'no'); }83 refreshselections();84 loadoptions();85 });86$('#quotesummary').change(function() {87 if(this.checked) { setoptions('quotesummary', 'yes'); } else { setoptions('quotesummary', 'no'); }88 refreshselections();89 loadoptions();90 });91$('#authorflagging').change(function() {92 if(this.checked) { setoptions('authorflagging', 'yes'); } else { setoptions('authorflagging', 'no'); }93 refreshselections();94 loadoptions();95 });96$('#phrasesummary').change(function() {97 if(this.checked) { setoptions('phrasesummary', 'yes'); } else { setoptions('phrasesummary', 'no'); }98 refreshselections();99 loadoptions();100 });101$('#bracketsquare').change(function() {102 if(this.checked) { setoptions('bracketsquare', 'yes'); } else { setoptions('bracketsquare', 'no');}103 refreshselections();104 loadoptions();105 });106$('#bracketround').change(function() {107 if(this.checked) { setoptions('bracketround', 'yes'); } else { setoptions('bracketround', 'no'); }108 refreshselections();109 loadoptions();110 });111$('#bracketangled').change(function() {112 if(this.checked) { setoptions('bracketangled', 'yes'); } else { setoptions('bracketangled', 'no'); }113 refreshselections();114 loadoptions();115 });116$('#bracketcurly').change(function() {117 if(this.checked) { setoptions('bracketcurly', 'yes'); } else { setoptions('bracketcurly', 'no'); }118 refreshselections();119 loadoptions();120 });121$('#debughtml').change(function() {122 if(this.checked) { setoptions('debughtml', 'yes'); } else { setoptions('debughtml', 'no'); }123 refreshselections();124 loadoptions();125 });126$('#debugdb').change(function() {127 if(this.checked) { setoptions('debugdb', 'yes'); } else { setoptions('debugdb', 'no'); }128 refreshselections();129 loadoptions();130 });131$('#debuglex').change(function() {132 if(this.checked) { setoptions('debuglex', 'yes'); } else { setoptions('debuglex', 'no'); }133 refreshselections();134 loadoptions();135 });136$('#debugparse').change(function() {137 if(this.checked) { setoptions('debugparse', 'yes'); } else { setoptions('debugparse', 'no'); }138 refreshselections();139 loadoptions();140 });141$('#indexskipsknownwords').change(function() {142 if(this.checked) { setoptions('indexskipsknownwords', 'yes'); } else { setoptions('indexskipsknownwords', 'no'); }143 refreshselections();144 loadoptions();145 });146$('#searchinsidemarkup').change(function() {147 if(this.checked) { setoptions('searchinsidemarkup', 'yes'); } else { setoptions('searchinsidemarkup', 'no'); }148 refreshselections();149 loadoptions();150 });151$('#zaplunates').change(function() {152 if(this.checked) { setoptions('zaplunates', 'yes'); } else { setoptions('zaplunates', 'no'); }153 refreshselections();154 loadoptions();155 });156$('#zapvees').change(function() {157 if(this.checked) { setoptions('zapvees', 'yes'); } else { setoptions('zapvees', 'no'); }158 refreshselections();159 loadoptions();160 });161$('#suppresscolors').change(function() {162 if(this.checked) { setoptions('suppresscolors', 'yes'); } else { setoptions('suppresscolors', 'no'); }163 refreshselections();164 loadoptions();165 window.location.href = '/';166 });167$('#simpletextoutput').change(function() {168 if(this.checked) { setoptions('simpletextoutput', 'yes'); } else { setoptions('simpletextoutput', 'no'); }169 refreshselections();170 loadoptions();171 });172$('#principleparts').change(function() {173 if(this.checked) { setoptions('principleparts', 'yes'); } else { setoptions('principleparts', 'no'); }174 if(this.checked) { $('#mophologytablesoptions').show(); } else { $('#mophologytablesoptions').hide(); }175 refreshselections();176 loadoptions();177 });178$('#showwordcounts').change(function() {179 if(this.checked) { setoptions('showwordcounts', 'yes'); } else { setoptions('showwordcounts', 'no'); }180 refreshselections();181 loadoptions();182 });183$('#morphdialects').change(function() {184 if(this.checked) { setoptions('morphdialects', 'yes'); } else { setoptions('morphdialects', 'no'); }185 refreshselections();186 loadoptions();187 });188$('#morphduals').change(function() {189 if(this.checked) { setoptions('morphduals', 'yes'); } else { setoptions('morphduals', 'no'); }190 refreshselections();191 loadoptions();192 });193$('#morphemptyrows').change(function() {194 if(this.checked) { setoptions('morphemptyrows', 'yes'); } else { setoptions('morphemptyrows', 'no'); }195 refreshselections();196 loadoptions();197 });198$('#morphimper').change(function() {199 if(this.checked) { setoptions('morphimper', 'yes'); } else { setoptions('morphimper', 'no'); }200 refreshselections();201 loadoptions();202 });203$('#morphinfin').change(function() {204 if(this.checked) { setoptions('morphinfin', 'yes'); } else { setoptions('morphinfin', 'no'); }205 refreshselections();206 loadoptions();207 });208$('#morphfinite').change(function() {209 if(this.checked) { setoptions('morphfinite', 'yes'); } else { setoptions('morphfinite', 'no'); }210 refreshselections();211 loadoptions();212 });213$('#morphpcpls').change(function() {214 if(this.checked) { setoptions('morphpcpls', 'yes'); } else { setoptions('morphpcpls', 'no'); }215 refreshselections();216 loadoptions();217 });218$('#morphtables').change(function() {219 if(this.checked) { setoptions('morphtables', 'yes'); } else { setoptions('morphtables', 'no'); }220 refreshselections();221 loadoptions();222 });223$('#collapseattic').change(function() {224 if(this.checked) { setoptions('collapseattic', 'yes'); } else { setoptions('collapseattic', 'no'); }225 refreshselections();226 loadoptions();...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker-parent');2stryker.setOptions({3});4module.exports = require('test.js');5var stryker = require('stryker-parent');6stryker.setOptions({7});8module.exports = function (config) {9 config.set({10 });11};12 at Object.exports.runInThisContext (vm.js:53:16)13 at Module._compile (module.js:373:25)14 at Object.Module._extensions..js (module.js:416:10)15 at Module.load (module.js:343:32)16 at Function.Module._load (module.js:300:12)17 at Module.require (module.js:353:17)18 at require (internal/module.js:12:17)19 at ConfigReader.loadConfig (/Users/

Full Screen

Using AI Code Generation

copy

Full Screen

1const { setOptions } = require('stryker-parent');2setOptions({3 mochaOptions: {4 }5});6const { setOptions } = require('stryker-mocha-runner');7setOptions({8});9const { setOptions } = require('stryker-mocha-framework');10setOptions({11});12const { setOptions } = require('stryker-mocha-framework');13setOptions({14});15const { setOptions } = require('stryker-mocha-framework');16setOptions({17});18const { setOptions } = require('stryker-mocha-framework');19setOptions({20});21const { setOptions } = require('stryker-mocha-framework');22setOptions({23});24const { setOptions } = require('stryker-mocha-framework');25setOptions({26});27const { setOptions } = require('stryker-mocha-framework');28setOptions({29});30const { setOptions } = require('stryker-mocha-framework');31setOptions({32});33const { setOptions } = require('stryker-mocha-framework');34setOptions({35});36const { setOptions } = require('stryker-mocha-framework');37setOptions({38});

Full Screen

Using AI Code Generation

copy

Full Screen

1function setOptions(options) {2}3{4}5{6}7{8}9{10}11{12}13{14}

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker-parent');2stryker.setOptions({3 strykerOptions: {4 }5});6* `strykerOptions` - The options for the stryker run. See [Stryker Options](

Full Screen

Using AI Code Generation

copy

Full Screen

1const path = require('path');2const setOptions = require('stryker-parent').setOptions;3const options = {4 commandRunner: {5 cwd: path.resolve(__dirname)6 }7};8setOptions(options);9const stryker = require('stryker');10const log = require('stryker-api').log;11const log4js = require('log4js');12log4js.configure({13 { type: 'console' }14});15log4js.setGlobalLogLevel('info');16log4js.getLogger('stryker').setLevel('info');17stryker.runMutationTest().then(function (result) {18 log.info('Done!');19 process.exit(result);20});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful