Tutorial.ResponseHandler

function run_responsehandler(root) {
    rh = new TK.ResponseHandler({
        depth: 120,
        db_grid: 12,
        range_z: {min: 1, max: 20, step: 0.1, shift_up: 5, shift_down: 0.2}
    });
    handles = [
        rh.add_handle({x:200, y:0, z: 5, mode:"circular",
                       z_handle: "right", title:"handle 1", z_min: 1, z_max: 20}),
        rh.add_handle({x:6000, y:22, z: 7, mode:"circular",
                       z_handle: "right", title:"handle 2", z_min: 1, z_max: 20}),
        rh.add_handle({x:400, y:0, z: 3, mode:"circular",
                       z_handle: "right", title:"handle 3", z_min: 1, z_max: 20}),
        rh.add_handle({x:50, y:-12, z: 7, mode:"circular",
                       z_handle: "right", title:"handle 4", z_min: 1, z_max: 20}),
        rh.add_handle({x:200, y:24, z: 3, mode:"circular",
                       z_handle: "right", title:"handle 5", z_min: 1, z_max: 20}),
        rh.add_handle({x: 3000,
                       z: 3,
                       mode: "line-vertical",
                       z_handle: "left",
                       title: "handle 6",
                       z_min: 1,
                       z_max: 20,
                       preferences:["top-left", "top-right", "bottom-left",
                                    "bottom-right", "left", "right"],
                       label: function(title, x, y, z){ return title + "\n" + (x|0) + " Hz"; }
                       }),
        rh.add_handle({x: 5000,
                       z: 3,
                       mode: "line-vertical",
                       z_handle: "top-right",
                       title: "handle 7",
                       y_min: -12,
                       y_max: 12,
                       z_min: 1,
                       z_max: 20,
                       preferences:["left", "right"],
                       label: function(title, x, y, z){ return title + "\n" + (x|0) + " Hz"; }
                       }),
        rh.add_handle({y: -24,
                       z: 3,
                       mode: "line-horizontal",
                       z_handle: "top",
                       title: "handle 8",
                       preferences: ["top-left", "bottom-left", "top-right",
                                     "bottom-right", "top", "bottom"],
                       label: function(title, x, y, z){ return title + "\n" + (y|0) + " dB"; }
                       }),
        rh.add_handle({y: 12,
                       z: 3,
                       mode: "line-horizontal",
                       z_handle: "top-right",
                       title: "handle 9",
                       x_min: 1000,
                       x_max: 2000,
                       z_min: 1,
                       z_max: 20,
                       preferences:["top", "bottom"],
                       label: function (title, x, y, z) { return title + "\n" + (y|0) + " dB"; }
                       }),
        rh.add_handle({x: 100,
                       z: 3,
                       mode: "block-left",
                       title: "handle 10",
                       x_max: 2000,
                       z_min: 1,
                       z_max: 20,
                       min_drag: 5,
                       preferences: ["top-right", "top", "top-left",
                                     "right", "center", "left",
                                     "bottom-right", "bottom", "bottom-left"],
                       label: function (title, x, y, z) { return title + "\n" + (x|0) + " Hz"; } 
                       }),
        rh.add_handle({x: 8000,
                       z: 3,
                       mode: "block-right",
                       title: "handle 11",
                       x_min: 2000,
                       y_min: 0,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["top-left", "top", "top-right",
                                     "left", "center", "right",
                                     "bottom-left", "bottom", "bottom-right"],
                       label: function (title, x, y, z) { return title + "\n" + (x|0) + " Hz"; } 
                       }),
        rh.add_handle({x: 10000,
                       z: 3,
                       mode: "block-right",
                       title: "handle 11",
                       x_min: 2000,
                       y_max: 0,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["top-left", "top", "top-right",
                                     "left", "center", "right",
                                     "bottom-left", "bottom", "bottom-right"],
                       label: function (title, x, y, z) { return title + "\n" + (x|0) + " Hz"; } 
                       }),
        rh.add_handle({y: 20,
                       z: 3,
                       mode: "block-top",
                       z_handle: "bottom",
                       title: "handle 11",
                       x_min: 500,
                       x_max: 1000,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["top", "center", "bottom"],
                       label: function (title, x, y, z) { return title + "\n" + (y|0) + " dB"; } 
                       }),
        rh.add_handle({y: 26,
                       z: 3,
                       mode: "block-top",
                       title: "handle 12",
                       x_min: 1000,
                       x_max: 2000,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["top", "center", "bottom"],
                       label: function (title, x, y, z) { return title + "\n" + (y|0) + " dB"; } 
                       }),
        rh.add_handle({y: -6,
                       z: 3,
                       mode: "block-bottom",
                       title: "handle 13",
                       x_min: 500,
                       x_max: 1000,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["bottom", "center", "top"],
                       label: function (title, x, y, z) { return title + "\n" + (y|0) + " dB"; } 
                       }),
        rh.add_handle({y: -16,
                       z: 3,
                       mode: "block-bottom",
                       title: "handle 14",
                       x_min: 1000,
                       x_max: 2000,
                       z_min: 1,
                       z_max: 20,
                       preferences: ["bottom", "center", "top"],
                       label: function (title, x, y, z) { return title + "\n" + (y|0) + " dB"; } 
                       })
    ];
    root.append_child(rh);
    TK.seat_all_svg()
}


.toolkit-response-handler {
    width: 100%;
    height: 100%;
    max-width: 1024;
    max-height: 480px;
    min-width: 400px;
    min-height: 120px;
}