Skip to content

Commit 9260233

Browse files
committed
tiler viewport bug fix
1 parent 83a992f commit 9260233

File tree

6 files changed

+13
-29
lines changed

6 files changed

+13
-29
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#### CHANGE LOG
22

3+
###### 2.0.1
4+
* viewport sizing bugfix
5+
36
###### 2.0.0
47
* new css api (now requires reverse class css for optional reverse support)
58
* optimized animations

Newfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sources:
33
default: ~/Code/ruby/new-tasks
44
name: Tiler
5-
version: 1.0.4
5+
version: 2.0.1
66
tasks:
77
changelog:
88
git:

demo/tiler_demo.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ html, body {
1616
background-position: 0% 100%;
1717
background-size: auto; }
1818
.tiler-viewport#background .tiler-tile {
19-
background: transparent; }
19+
background: transparent !important; }
2020
.tiler-viewport .buttons {
2121
position: absolute;
2222
z-index: 3;

demo/tiler_demo.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ html, body
1717
background-position: 0% 100%
1818
background-size: auto
1919
.tiler-tile
20-
background: transparent
20+
background: transparent !important
2121

2222
.buttons
2323
position: absolute

lib/tiler.js

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tiler.coffee

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# * tiler
33
# * https://github.com/brewster1134/tiler
44
# *
5-
# * @version 1.0.4
5+
# * @version 2.0.1
66
# * @author Ryan Brewster
77
# * Copyright (c) 2014
88
# * Licensed under the MIT license.
@@ -158,27 +158,16 @@
158158
#
159159
_setupTiles: ->
160160
self = @
161-
tileWidths = [ @element.outerWidth() ]
162-
tileHeights = [ @element.outerHeight() ]
163-
164-
# Remove any inline sizes from tiles
165-
@$tiles.css
166-
width: ''
167-
height: ''
168161

169162
# Loop through all tiles
170163
@$tiles.each ->
171-
# Add natural dimensions
172-
tileWidths.push $(@).outerWidth()
173-
tileHeights.push $(@).outerHeight()
174-
175164
# Add a data attribute with the viewport id
176165
$(@).attr 'data-tiler-viewport-id', self.element.attr('id')
177166

178167
# Set sizes
179168
@element.add(@$tiles).css
180-
width: Math.max tileWidths...
181-
height: Math.max tileHeights...
169+
width: @element.outerWidth()
170+
height: @element.outerHeight()
182171

183172
# Determine if we are advancing or retreating through our virtual tiles
184173
#

0 commit comments

Comments
 (0)