@ -583,20 +583,18 @@ cdb.admin.forms.density = {
polygon _comp _op
]
} ;
cdb . admin . forms . torque = {
var sharedForTorqueAndTorqueCat = {
'point' : [
{
name : 'Cumulative' ,
form : {
'torque-cumulative' : { type : 'switch' , value : false } ,
'layer-type' : { type : 'hidden' , value : 'torque' }
}
} ,
column _numeric _date _with _cartodb _id ,
{
name : 'Marker type' ,
form : {
'marker-type' : { type : 'select' , value : 'ellipse' , extra : [ 'ellipse' , 'rectangle' ] }
'marker-type' : { type : 'select' , value : 'ellipse' , extra : [ 'ellipse' , 'rectangle' ] } ,
// this layer-type value must be present among the form options for the torque wizards to work as expected!
// see issue #1166 on github, for related bug report and discussion.
'layer-type' : { type : 'hidden' , value : 'torque' }
}
} ,
{
@ -651,14 +649,21 @@ cdb.admin.forms.torque = {
} ;
cdb . admin . forms . torque _cat = clone ( cdb . admin . forms . torque ) ;
cdb . admin . forms . torque = clone ( sharedForTorqueAndTorqueCat ) ;
// Prepend the cumulative option for torque form only.
cdb . admin . forms . torque [ 'point' ] . unshift ( {
name : 'Cumulative' ,
form : {
'torque-cumulative' : { type : 'switch' , value : false }
}
} ) ;
cdb . admin . forms . torque _cat = clone ( sharedForTorqueAndTorqueCat ) ;
// insert category column after time column
cdb . admin . forms . torque _cat [ 'point' ] . splice ( 2 , 0 , column _torque _category ) ;
// remove cumulative option for torque category wizard
cdb . admin . forms . torque _cat [ 'point' ] . splice ( 0 , 1 ) ;
// change blend mode to not distort the colors
_ . find ( cdb . admin . forms . torque _cat [ 'point' ] , function ( o ) { return o . name === 'Blend Mode' } ) . form [ 'torque-blend-mode' ] . value = 'source-over' ;