Socket
Socket
Sign inDemoInstall

marionette-animated-region

Package Overview
Dependencies
7
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Changelog

## 1.1.2
- Upgrade dependencies
- Fix examples
- Updated README.md
## 1.1.1

@@ -7,0 +12,0 @@ - Upgrade dependencies

10

package.json
{
"name": "marionette-animated-region",
"description": "Backbone.Marionette animated region based on Velocity.js animation library",
"version": "1.1.1",
"version": "1.1.2",
"main": "lib/marionette-animated-region.js",

@@ -39,3 +39,3 @@ "author": {

"dependencies": {
"backbone": "^1.2.3",
"backbone": "^1.3.1",
"backbone.marionette": "^2.4.4",

@@ -47,6 +47,6 @@ "jquery": "^2.2.1",

"devDependencies": {
"babel-cli": "^6.5.1",
"babel-cli": "^6.6.5",
"babel-eslint": "^5.0.0",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-polyfill": "^6.7.2",
"babel-preset-es2015": "^6.6.0",
"chai": "^3.5.0",

@@ -53,0 +53,0 @@ "eslint": "^2.2.0",

@@ -36,14 +36,14 @@ ## Backbone.Marionette animated region based on Velocity.js

```javascript
var LayoutView = Marionette.LayoutView.extend({
regions: {
animatedRegion: {
selector: '#region_selector',
regionClass: AnimatedRegion,
animation: {
showAnimation: [...],
hideAnimation: [...]
}
var LayoutView = Marionette.LayoutView.extend({
regions: {
animatedRegion: {
selector: '#region_selector',
regionClass: AnimatedRegion,
animation: {
showAnimation: [...],
hideAnimation: [...]
}
}
});
}
});
```

@@ -55,35 +55,35 @@

```javascript
var LayoutView = Marionette.LayoutView.extend({
//...
var LayoutView = Marionette.LayoutView.extend({
//...
regions: {
exampleRegion: {
selector: '#region_selector',
regionClass: AnimatedRegion,
animation: {
showAnimation: [
{
properties: 'transition.slideDownBigIn',
options: { stagger: 300 }
}
],
hideAnimation: [
{
properties: 'transition.slideUpBigOut',
options: { stagger: 300 }
}
]
}
regions: {
exampleRegion: {
selector: '#region_selector',
regionClass: AnimatedRegion,
animation: {
showAnimation: [
{
properties: 'transition.slideDownBigIn',
options: { stagger: 300 }
}
],
hideAnimation: [
{
properties: 'transition.slideUpBigOut',
options: { stagger: 300 }
}
]
}
},
onRender: function() {
// this view will render with animation
this.animatedRegion.show(new Marionette.ItemView());
// and after 2 second remove with animation
_.delay(_.bind(function() { this.exampleRegion.empty(); }, this), 2000);
}
});
},
new LayoutView({ el: $('#layout_view') }).render();
onRender: function() {
// this view will render with animation
this.animatedRegion.show(new Marionette.ItemView());
// and after 2 second remove with animation
_.delay(_.bind(function() { this.exampleRegion.empty(); }, this), 2000);
}
});
new LayoutView({ el: $('#layout_view') }).render();
```

@@ -93,21 +93,21 @@

```javascript
//...
showAnimation: [
{
properties: 'transition.slideRightBigIn',
options: { stagger: 500 }
},
{
properties: {
rotateZ: '180deg'
}
},
{
properties: {
rotateZ: '90deg'
}
},
//...
showAnimation: [
{
properties: 'transition.slideRightBigIn',
options: { stagger: 500 }
},
{
properties: {
rotateZ: '180deg'
}
},
{
properties: {
rotateZ: '90deg'
}
},
//...
],
//...
],
//...
```

@@ -120,17 +120,17 @@

```javascript
//...
initialize: function() {
this.listenTo(AnimatedRegion, 'region:shown', function(region) {
// region variable contains region which has beed rendered,
// you can manipulate it
if (region.options.name) {
console.log(region.options.name + ' has been rendered');
}
});
//...
initialize: function() {
this.listenTo(AnimatedRegion, 'region:shown', function(region) {
// region variable contains region which has beed rendered,
// you can manipulate it
if (region.options.name) {
console.log(region.options.name + ' has been rendered');
}
});
this.listenTo(AnimatedRegion, 'region:removed', function(region) {
console.log(region);
});
},
//...
this.listenTo(AnimatedRegion, 'region:removed', function(region) {
console.log(region);
});
},
//...
```

@@ -137,0 +137,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc