{"id":13742895,"url":"https://github.com/folletto/Argilla-Mosaic","last_synced_at":"2025-05-09T00:31:58.209Z","repository":{"id":136840795,"uuid":"466411","full_name":"folletto/Argilla-Mosaic","owner":"folletto","description":"ActionScript 3 dynamic layout library.","archived":false,"fork":false,"pushed_at":"2014-07-22T12:08:37.000Z","size":144,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T15:47:47.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://intenseminimalism.com","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folletto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-01-10T18:00:27.000Z","updated_at":"2021-06-10T13:52:05.000Z","dependencies_parsed_at":"2023-03-13T10:59:14.510Z","dependency_job_id":null,"html_url":"https://github.com/folletto/Argilla-Mosaic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folletto%2FArgilla-Mosaic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folletto%2FArgilla-Mosaic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folletto%2FArgilla-Mosaic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folletto%2FArgilla-Mosaic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folletto","download_url":"https://codeload.github.com/folletto/Argilla-Mosaic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171044,"owners_count":21865275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:00:37.469Z","updated_at":"2025-05-09T00:31:57.879Z","avatar_url":"https://github.com/folletto.png","language":"ActionScript","funding_links":[],"categories":["User Interface"],"sub_categories":["Layout"],"readme":"Mosaic - AS3 Layout Library\n===========================\n\nHelper to provide modular alignment between objects.  \nEach object can be bound to just one other object. New binds will redefine the old one.\n\nUsage\n-----\n\n```\n  var a = new Mosaic();\n  a.tile(Mosaic.BOTTOM_RIGHT, Mosaic.TOP_LEFT, sprite1, sprite2);\n```\n\nYou can also add a chain of elements, using the same pair of parameters:\n\n```\n  a.tile(Mosaic.BOTTOM_RIGHT, Mosaic.BOTTOM_LEFT, sprite1, sprite2, sprite3, sprite4);\n```\n\nYou can use the contract form:\n\n```\n  a.tile(\"br\", \"bl\", sprite1, sprite2, sprite3, sprite4);\n```\n\nTo remove:\n\n```\n  a.untile(sprite2);\n```\n\nIf there are elements bound to the removed element, they will realign \"falling\"\nin the place of the unbound element.\n\nNote that normal `addChild()` also works, but it's automatically done on `tile()`:\n```\n  a.addChild(sprite1);\n```\n\nThe Mosaic object supports also an Array-like structure, using this syntax:\n\n```\n  a.array.name(Mosaic.BOTTOM_RIGHT, Mosaic.TOP_LEFT);\n  a.array.name.push(sprite1);\n  obj = a.array.name.pop();\n  obj = a.array.name.shift();\n  a.array.name.unshift(sprite2);\n  a.array.splice(2, 1, sprite3, sprite4);\n\n  a.array.name[2]; // Positional get (arrya index)\n  a.array.name[\"item\"]; // Name get (getChildByName shortcut)\n```\n\nThe Mosaic object supports also a \"fast\" creation for Display Objects, using `mold()`:\n\n```\n  var obj = Mosaic.mold(TextField, \"name\", { prop1: \"data\", onEvent: function(){}, ... })\n  a.array.name.mold(\n    [TextField, \"name1\", { prop1: \"data\", onEvent: function(){}, ... }],\n    [TextField, \"name2\", { prop1: \"data\", onEvent: function(){}, ... }],\n  );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolletto%2FArgilla-Mosaic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolletto%2FArgilla-Mosaic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolletto%2FArgilla-Mosaic/lists"}