mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Update PatchTree and applyPatch to skip TouchTransmitter instances during patch processing
- Modified the logic in PatchTree.build and applyPatch functions to skip instances of ClassName "TouchTransmitter", which are auto-created by Roblox for touch events. - This change enhances the efficiency of patch applications by preventing unnecessary processing of these instances.
This commit is contained in:
parent
aa09717545
commit
c5c6bf9a10
3 changed files with 6 additions and 6 deletions
|
|
@ -335,8 +335,8 @@ function PatchTree.build(patch, instanceMap, changeListHeaders)
|
|||
continue
|
||||
end
|
||||
|
||||
-- Skip TouchInterest (auto-created by Roblox when touch events are connected)
|
||||
if instance.ClassName == "TouchInterest" then
|
||||
-- Skip TouchTransmitter (auto-created by Roblox when touch events are connected)
|
||||
if instance.ClassName == "TouchTransmitter" then
|
||||
continue
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ local function applyPatch(instanceMap, patch)
|
|||
local deferredRefs = {}
|
||||
|
||||
for _, removedIdOrInstance in ipairs(patch.removed) do
|
||||
-- Skip TouchInterest (auto-created by Roblox when touch events are connected)
|
||||
-- Skip TouchTransmitter (auto-created by Roblox when touch events are connected)
|
||||
local instance = if Types.RbxId(removedIdOrInstance) then instanceMap.fromIds[removedIdOrInstance] else removedIdOrInstance
|
||||
if instance and instance.ClassName == "TouchInterest" then
|
||||
if instance and instance.ClassName == "TouchTransmitter" then
|
||||
continue
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -335,8 +335,8 @@ local function diff(instanceMap, virtualInstances, rootId)
|
|||
-- corresponding virtual instance should be removed. Any instance that
|
||||
-- does have a corresponding virtual instance is recursively diffed.
|
||||
for _, childInstance in ipairs(instance:GetChildren()) do
|
||||
-- Skip TouchInterest (auto-created by Roblox when touch events are connected)
|
||||
if childInstance.ClassName == "TouchInterest" then
|
||||
-- Skip TouchTransmitter (auto-created by Roblox when touch events are connected)
|
||||
if childInstance.ClassName == "TouchTransmitter" then
|
||||
continue
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue