Skip to content

Commit

Permalink
tiler viewport bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brewster1134 committed May 26, 2016
1 parent 83a992f commit 9260233
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 29 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### CHANGE LOG

###### 2.0.1
* viewport sizing bugfix

###### 2.0.0
* new css api (now requires reverse class css for optional reverse support)
* optimized animations
Expand Down
2 changes: 1 addition & 1 deletion Newfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sources:
default: ~/Code/ruby/new-tasks
name: Tiler
version: 1.0.4
version: 2.0.1
tasks:
changelog:
git:
Expand Down
2 changes: 1 addition & 1 deletion demo/tiler_demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ html, body {
background-position: 0% 100%;
background-size: auto; }
.tiler-viewport#background .tiler-tile {
background: transparent; }
background: transparent !important; }
.tiler-viewport .buttons {
position: absolute;
z-index: 3;
Expand Down
2 changes: 1 addition & 1 deletion demo/tiler_demo.sass
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ html, body
background-position: 0% 100%
background-size: auto
.tiler-tile
background: transparent
background: transparent !important

.buttons
position: absolute
Expand Down
16 changes: 4 additions & 12 deletions lib/tiler.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions src/tiler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# * tiler
# * https://github.com/brewster1134/tiler
# *
# * @version 1.0.4
# * @version 2.0.1
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand Down Expand Up @@ -158,27 +158,16 @@
#
_setupTiles: ->
self = @
tileWidths = [ @element.outerWidth() ]
tileHeights = [ @element.outerHeight() ]

# Remove any inline sizes from tiles
@$tiles.css
width: ''
height: ''

# Loop through all tiles
@$tiles.each ->
# Add natural dimensions
tileWidths.push $(@).outerWidth()
tileHeights.push $(@).outerHeight()

# Add a data attribute with the viewport id
$(@).attr 'data-tiler-viewport-id', self.element.attr('id')

# Set sizes
@element.add(@$tiles).css
width: Math.max tileWidths...
height: Math.max tileHeights...
width: @element.outerWidth()
height: @element.outerHeight()

# Determine if we are advancing or retreating through our virtual tiles
#
Expand Down

0 comments on commit 9260233

Please sign in to comment.