naming convention

This commit is contained in:
Thibault Duplessis 2019-04-16 15:39:43 +07:00
parent dbd6fde2af
commit 6341a4e555
6 changed files with 6 additions and 6 deletions

View file

@ -59,7 +59,7 @@ function renderPromotion(ctrl: AnalyseCtrl, dest: Key, pieces, color: Color, ori
const vertical = color === orientation ? 'top' : 'bottom';
return h('div#promotion_choice.' + vertical, {
return h('div#promotion-choice.' + vertical, {
hook: onInsert(el => {
el.addEventListener('click', _ => cancel(ctrl));
el.oncontextmenu = () => false;

View file

@ -1,4 +1,4 @@
#promotion_choice {
#promotion-choice {
@extend %abs-100;
position: absolute;
background: fade-out($c-bg-page, .3);

View file

@ -78,7 +78,7 @@
.highlight-5th-rank & .cg-board::after {
top: 37.5%;
}
#promotion_choice .explanation {
#promotion-choice .explanation {
position: absolute;
top: 25%;
left: 25%;

View file

@ -36,7 +36,7 @@ function renderPromotion(ctrl, dest, pieces, color, orientation, explain) {
var vertical = color === orientation ? 'top' : 'bottom';
return m('div#promotion_choice.' + vertical, [
return m('div#promotion-choice.' + vertical, [
pieces.map(function(serverRole, i) {
return m('square', {
style: vertical + ': ' + i * 12.5 + '%;left: ' + left + '%',

View file

@ -59,7 +59,7 @@ export default function(vm: Vm, getGround, redraw: () => void) {
const vertical = color === orientation ? 'top' : 'bottom';
return h('div#promotion_choice.' + vertical, {
return h('div#promotion-choice.' + vertical, {
hook: {
insert: vnode => {
const el = (vnode.elm as HTMLElement);

View file

@ -89,7 +89,7 @@ function renderPromotion(ctrl: RoundController, dest: cg.Key, roles: cg.Role[],
if (orientation === 'white') left = 87.5 - left;
var vertical = color === orientation ? 'top' : 'bottom';
return h('div#promotion_choice.' + vertical, {
return h('div#promotion-choice.' + vertical, {
hook: onInsert(el => {
el.addEventListener('click', () => cancel(ctrl));
el.addEventListener('contextmenu', e => {