Skip to content

Commit

Permalink
transition property bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Brewster committed Jun 12, 2015
1 parent 49d9719 commit bf8ec49
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 71 deletions.
9 changes: 0 additions & 9 deletions .new

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### CHANGE LOG

###### 1.0.2
* transition-property bugfix

###### 1.0.1
* force gpu animations on tiler-tile elements

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
source 'https://rubygems.org'
gem 'sass', '~> 3.4.8'
gem 'sass', '~> 3.4'
7 changes: 5 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
sass (3.4.8)
sass (3.4.14)

PLATFORMS
ruby

DEPENDENCIES
sass (~> 3.4.8)
sass (~> 3.4)

BUNDLED WITH
1.10.3
11 changes: 11 additions & 0 deletions Newfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
sources:
default: ~/Code/ruby/new-tasks
name: Tiler
version: 1.0.1
tasks:
changelog:
git:
remotes:
- repo: origin
branch: master
4 changes: 2 additions & 2 deletions demo/tiler_demo.js

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

38 changes: 13 additions & 25 deletions lib/tiler.js

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

49 changes: 17 additions & 32 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.0
# * @version 1.0.2
# * @author Ryan Brewster
# * Copyright (c) 2014
# * Licensed under the MIT license.
Expand Down Expand Up @@ -44,7 +44,7 @@
refresh: ->
@_init()
@element.trigger 'tiler.refresh'
@$enterTile.trigger 'tiler.refresh'
@$enterTile?.trigger 'tiler.refresh'

goTo: (tile, animation) ->
# find tile
Expand Down Expand Up @@ -129,7 +129,7 @@

enterTileInitialState = 'enter'
enterTileInitialPosition = 'start'
enterTileFinalPosition = 'end'
enterTileFinalPosition = 'end active'

else
exitTileInitialState = 'enter'
Expand All @@ -138,43 +138,28 @@

enterTileInitialState = 'exit'
enterTileInitialPosition = 'end'
enterTileFinalPosition = 'start'
enterTileFinalPosition = 'start active'

# EXIT TILE
# set enter tile start position without any animations
#
@$exitTile.css
'transition-property': 'none'
'-o-transition-property': 'none'
'-moz-transition-property': 'none'
'-webkit-transition-property': 'none'
@$exitTile.attr 'class', "tiler-tile #{exitTileInitialState} #{exitTileInitialPosition} #{animationClass}"
@$exitTile.css
'transition-duration': ''
'-o-transition-duration': ''
'-moz-transition-duration': ''
'-webkit-transition-duration': ''
# setup tiles without animations
@$exitTile.add(@$enterTile).css
'transition-duration': '0'
'-o-transition-duration': '0'
'-moz-transition-duration': '0'
'-webkit-transition-duration': '0'

# trigger the end position
@$exitTile.switchClass exitTileInitialPosition, exitTileFinalPosition

# ENTER TILE
# set enter tile start position without any animations
#
@$enterTile.css
'transition-property': 'none'
'-o-transition-property': 'none'
'-moz-transition-property': 'none'
'-webkit-transition-property': 'none'
# add start state classes
@$exitTile.attr 'class', "tiler-tile #{exitTileInitialState} #{exitTileInitialPosition} #{animationClass}"
@$enterTile.attr 'class', "tiler-tile #{enterTileInitialState} #{enterTileInitialPosition} #{animationClass}"
@$enterTile.css

# restore animation duration
@$exitTile.add(@$enterTile).css
'transition-duration': ''
'-o-transition-duration': ''
'-moz-transition-duration': ''
'-webkit-transition-duration': ''

# trigger the end position
enterTileFinalPosition = "#{enterTileFinalPosition} active"
# swap classes to animate
@$exitTile.switchClass exitTileInitialPosition, exitTileFinalPosition
@$enterTile.switchClass enterTileInitialPosition, enterTileFinalPosition

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

0 comments on commit bf8ec49

Please sign in to comment.