Skip to content

Commit bf8ec49

Browse files
author
Ryan Brewster
committed
transition property bug fix
1 parent 49d9719 commit bf8ec49

File tree

8 files changed

+52
-71
lines changed

8 files changed

+52
-71
lines changed

.new

Lines changed: 0 additions & 9 deletions
This file was deleted.

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+
###### 1.0.2
4+
* transition-property bugfix
5+
36
###### 1.0.1
47
* force gpu animations on tiler-tile elements
58

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
source 'https://rubygems.org'
2-
gem 'sass', '~> 3.4.8'
2+
gem 'sass', '~> 3.4'

Gemfile.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
sass (3.4.8)
4+
sass (3.4.14)
55

66
PLATFORMS
77
ruby
88

99
DEPENDENCIES
10-
sass (~> 3.4.8)
10+
sass (~> 3.4)
11+
12+
BUNDLED WITH
13+
1.10.3

Newfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sources:
3+
default: ~/Code/ruby/new-tasks
4+
name: Tiler
5+
version: 1.0.1
6+
tasks:
7+
changelog:
8+
git:
9+
remotes:
10+
- repo: origin
11+
branch: master

demo/tiler_demo.js

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

lib/tiler.js

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

src/tiler.coffee

Lines changed: 17 additions & 32 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.0
5+
# * @version 1.0.2
66
# * @author Ryan Brewster
77
# * Copyright (c) 2014
88
# * Licensed under the MIT license.
@@ -44,7 +44,7 @@
4444
refresh: ->
4545
@_init()
4646
@element.trigger 'tiler.refresh'
47-
@$enterTile.trigger 'tiler.refresh'
47+
@$enterTile?.trigger 'tiler.refresh'
4848

4949
goTo: (tile, animation) ->
5050
# find tile
@@ -129,7 +129,7 @@
129129

130130
enterTileInitialState = 'enter'
131131
enterTileInitialPosition = 'start'
132-
enterTileFinalPosition = 'end'
132+
enterTileFinalPosition = 'end active'
133133

134134
else
135135
exitTileInitialState = 'enter'
@@ -138,43 +138,28 @@
138138

139139
enterTileInitialState = 'exit'
140140
enterTileInitialPosition = 'end'
141-
enterTileFinalPosition = 'start'
141+
enterTileFinalPosition = 'start active'
142142

143-
# EXIT TILE
144-
# set enter tile start position without any animations
145-
#
146-
@$exitTile.css
147-
'transition-property': 'none'
148-
'-o-transition-property': 'none'
149-
'-moz-transition-property': 'none'
150-
'-webkit-transition-property': 'none'
151-
@$exitTile.attr 'class', "tiler-tile #{exitTileInitialState} #{exitTileInitialPosition} #{animationClass}"
152-
@$exitTile.css
153-
'transition-duration': ''
154-
'-o-transition-duration': ''
155-
'-moz-transition-duration': ''
156-
'-webkit-transition-duration': ''
143+
# setup tiles without animations
144+
@$exitTile.add(@$enterTile).css
145+
'transition-duration': '0'
146+
'-o-transition-duration': '0'
147+
'-moz-transition-duration': '0'
148+
'-webkit-transition-duration': '0'
157149

158-
# trigger the end position
159-
@$exitTile.switchClass exitTileInitialPosition, exitTileFinalPosition
160-
161-
# ENTER TILE
162-
# set enter tile start position without any animations
163-
#
164-
@$enterTile.css
165-
'transition-property': 'none'
166-
'-o-transition-property': 'none'
167-
'-moz-transition-property': 'none'
168-
'-webkit-transition-property': 'none'
150+
# add start state classes
151+
@$exitTile.attr 'class', "tiler-tile #{exitTileInitialState} #{exitTileInitialPosition} #{animationClass}"
169152
@$enterTile.attr 'class', "tiler-tile #{enterTileInitialState} #{enterTileInitialPosition} #{animationClass}"
170-
@$enterTile.css
153+
154+
# restore animation duration
155+
@$exitTile.add(@$enterTile).css
171156
'transition-duration': ''
172157
'-o-transition-duration': ''
173158
'-moz-transition-duration': ''
174159
'-webkit-transition-duration': ''
175160

176-
# trigger the end position
177-
enterTileFinalPosition = "#{enterTileFinalPosition} active"
161+
# swap classes to animate
162+
@$exitTile.switchClass exitTileInitialPosition, exitTileFinalPosition
178163
@$enterTile.switchClass enterTileInitialPosition, enterTileFinalPosition
179164

180165
# find possible links throughout the entire page and set meta data on them

0 commit comments

Comments
 (0)