From f57105a66fd81859dad48a11efa08247ede81d98 Mon Sep 17 00:00:00 2001 From: Sigurd Fosseng Date: Sun, 13 Mar 2016 21:19:05 +0100 Subject: [PATCH] re-add frames I'm using a deprecated API, but it's replacement `slot` ha no working polyfill yet. --- src/chess-board.html | 5 ----- src/chess-board.js | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/chess-board.html b/src/chess-board.html index 0238023..226eedc 100644 --- a/src/chess-board.html +++ b/src/chess-board.html @@ -34,11 +34,6 @@ -ms-transform:rotate(180deg); -webkit-transform:rotate(180deg); } - :host([reverse]) .chessBoard{ - transform:rotate(180deg); - -ms-transform:rotate(180deg); - -webkit-transform:rotate(180deg); - } diff --git a/src/chess-board.js b/src/chess-board.js index bf91cac..c7016df 100644 --- a/src/chess-board.js +++ b/src/chess-board.js @@ -1,5 +1,5 @@ import { ASCIIBoard } from './ascii-chess-board' -import { template, getPieceClone } from './templates' +import { template, frameTemplate, getPieceClone } from './templates' import { removeNodeContent } from './dom-utils' class ChessBoard extends HTMLElement { @@ -11,6 +11,10 @@ class ChessBoard extends HTMLElement { this._asciiBoard = new ASCIIBoard(this.innerHTML.trim()) this._board = this._boardRoot.querySelector('.chessBoard') + + this._frameRoot = this.createShadowRoot() + this._frameRoot.appendChild(frameTemplate.content.cloneNode(true)) + this._renderBoard() /*