{"size": 943, "ext": "js", "max_stars_repo_path": "play/assets/js/components/map/editor/activeBrushTile.js", "max_stars_repo_name": "nemero/nemero.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "play/assets/js/components/map/editor/activeBrushTile.js", "max_issues_repo_name": "nemero/nemero.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "play/assets/js/components/map/editor/activeBrushTile.js", "max_forks_repo_name": "nemero/nemero.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.4523809524, "max_line_length": 138, "alphanum_fraction": 0.5174973489}
Vue.component('activeBrushTile', {
  props: ['tile'],
  template: ['<span>',
      '<span class="active-brush-tile" :style="getTileStyle" :class="getTileMapClass"></span>',
      '<!--{{ tile }}-->',
    '</span>'].join(""),
  computed: {
  	getTileStyle: function () {
  		let data = {}
  		let tile = this.tile
  		if (!tile) {
  			return data
  		}

			data['width'] = config.db.tileSize[0] + 'px'
			data['height'] = config.db.tileSize[1] + 'px'

  		if (tile['texture']) {
  			data['background'] = 'url(' + tile['texture'] + ')'
  		}
  		if (tile['offset']) {
  			data['background-position'] = '-' + tile['offset'][0]*config.db.tileSize[0] + 'px -' + tile['offset'][1]*config.db.tileSize[1] + 'px'
  		}

  		return data
  	},
  	getTileMapClass: function () {
  		let data = {}
  		let tile = this.tile

  		if (!tile) {
  			return data
  		}

  		if (tile['map']) {
  			data[tile['map']] = true
  		}

  		return data
  	},
  }
})