מדיה ויקי:Gadget-pgnviewer.js – הבדלי גרסאות

תוכן שנמחק תוכן שנוסף
יותר מדויק
מ legend placement minor fix
שורה 29:
minBlockSize = 20,
maxBlockSize = 60,
boardPadding = 20,
rtlregex = /[א-ת]/,
wrapperSelector = 'div.pgn-source-wrapper',
שורה 124 ⟵ 125:
mw.notify( gameSet.autoPlayDelay, { tag: 'delay' } ); // eventurally use mw.messages.get and format better message. named notification so it replaces previous
},
// 6 is half letter size (assuming font-size 0.875em)
top: function(row, l) { return (((this.flipButton.state ? row : (7 - row)) + (l ? 0.3 : 0)) * this.blockSize + 20) + 'px'; },
lefttop: function(filerow, l) { return (((this.flipButton.state ? row : (7 - file : filerow)) + (l ? 0.53 : 0)) * this.blockSize + 20(l? boardPadding-6: boardPadding)) + 'px'; },
topleft: function(rowfile, l) { return (((this.flipButton.state ? row : (7 - row)file : file) + (l ? 0.35 : 0)) * this.blockSize + 20(l? boardPadding-6: boardPadding)) + 'px'; },
legendLocation: function(side, num) {
var n = 0.5 + num;
שורה 132 ⟵ 134:
return {top: 0, left: this.left(num, true)};
case 'e':
return {top: this.top(num, true), left: this.blockSize * 8 + 20boardPadding + 5};
case 's':
return {top: this.blockSize * 8 + 20, left: this.left(num, true)};
case 'w':
return {top: this.top(num, true), left: 105};
}
},
שורה 828 ⟵ 830:
gameSet.boardDiv = $('<div>', {'class': 'pgn-board-div'});
gameSet.boardImg = $('<img>', {'class': 'pgn-board-img', src: images.board.url } )
.css({padding: 20boardPadding})
.appendTo(gameSet.boardDiv);