summaryrefslogtreecommitdiff
path: root/studio-susie/public/assets/js/lib/view/PaintingView.js
blob: 5c4f3bdd19c0ab5e79b9a9f60e92524afcb73539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var PaintingView = View.extend({

  el: "body",

  // template: liquid($('#tmpl-about').html()),

  events: {
  },

  initialize: function(options){
    options = options || {}
    var data = this.data = options.data
  },
  
  render: function(){
    if (this.rendered) return
    this.rendered = true
  },
  
  show: function(){
    this.render(this.data)
    document.body.className = "painting"
  },

  hide: function(){
    // document.body.className = "about"
  },

  load: function(id){
    var index = this.data.paintings.map(function(p){ return p.id }).indexOf(id)
    if (index) {
      $.fn.fullpage.moveTo(index+1)
    }
  },

})