"items": [
{
"listeners": {
- "scroll_event": "( event) => {\n\n print(\"scroll event\");\n var y = this.filelayout.el.y;\n var dir = event.direction;\n switch (dir) {\n case Clutter.ScrollDirection.UP:\n y += event.y /2;\n break;\n case Clutter.ScrollDirection.DOWN:\n y -= event.y /2 ;\n break;\n default:\n return false;\n }\n // range of scroll -- can go up -- eg.. -ve value.\n \n y = float.min(0, y);\n \n // to work out the max -ve number\n // height of filelayout\n // height of scrollactor..\n \n \n print(\"\\nnew y %f - layout height = %f , sroll actor height %f\\n \".printf( \n y, this.filelayout.el.height, this.el.height)); \n // y = float.min(0, y); //??\n print(\"scroll event of %f - new y = %f \".printf(event.y, y));\n this.filelayout.el.y = y;\n return true;\n \n}"
+ "scroll_event": "( event) => {\n\n print(\"scroll event\");\n var y = this.filelayout.el.y;\n var dir = event.direction;\n switch (dir) {\n case Clutter.ScrollDirection.UP:\n y += event.y /2;\n break;\n case Clutter.ScrollDirection.DOWN:\n y -= event.y /2 ;\n break;\n default:\n return false;\n }\n // range of scroll -- can go up -- eg.. -ve value.\n \n y = float.min(0, y);\n \n // to work out the max -ve number\n // height of filelayout\n // height of scrollactor..\n \n \n print(\"\\nnew y %f sroll actor height %f = last child bottom %f\\n \".printf( \n y, \n this.el.height, \n this.filelayout.el.last_child.y + , this.filelayout.el.last_child.height)); \n // y = float.min(0, y); //??\n print(\"scroll event of %f - new y = %f \".printf(event.y, y));\n this.filelayout.el.y = y;\n return true;\n \n}"
},
"id": "ClutterFiles",
"scroll_mode": "Clutter.ScrollMode.VERTICAL",
// height of scrollactor..
- print("\nnew y %f - layout height = %f , sroll actor height %f\n ".printf(
- y, this.filelayout.el.height, this.el.height));
+ print("\nnew y %f sroll actor height %f = last child bottom %f\n ".printf(
+ y,
+ this.el.height,
+ this.filelayout.el.last_child.y + , this.filelayout.el.last_child.height));
// y = float.min(0, y); //??
print("scroll event of %f - new y = %f ".printf(event.y, y));
this.filelayout.el.y = y;
// height of scrollactor..
- print("\nnew y %f - layout height = %f , sroll actor height %f\n ".printf(
- y, this.filelayout.el.height, this.el.height));
+ print("\nnew y %f sroll actor height %f = last child bottom %f\n ".printf(
+ y,
+ this.el.height,
+ this.filelayout.el.last_child.y + , this.filelayout.el.last_child.height));
// y = float.min(0, y); //??
print("scroll event of %f - new y = %f ".printf(event.y, y));
this.filelayout.el.y = y;