-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #17484: 修复tsx文件对象层自定义属性读取错误 #17486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -19753,9 +19753,9 @@
export class frustum extends Frustum {
constructor();
}
}
- export const VERSION = "3.8.4";
+ export const VERSION = "3.8.5";
/**
* @en
* The main namespace of Cocos engine, all engine core classes, functions, properties and constants are defined in this namespace.
* @zh
@@ -63959,15 +63959,15 @@
* @en The event type indicates mouse leaves the window or canvas. Only Windows, macOS or web PC can
* trigger this event.
* @zh 当鼠标离开窗口或者 canvas 时发出该消息。只有 Windows、macOS 或者 PC web 会触发该事件。
*/
- MOUSE_LEAVE = "mouse-leave-window",
+ MOUSE_LEAVE = "mouse-leave",
/**
* @en The event type indicates mouse enters the window or canvas. Only Windows, macOS or web PC can
* trigger this event.
* @zh 当鼠标进入窗口或者 canvas 时发出该消息。只有 Windows、macOS 或者 PC web 会触发该事件。
*/
- MOUSE_ENTER = "mouse-enter-window",
+ MOUSE_ENTER = "mouse-enter",
/**
* @en
* The event type for mouse wheel events
*
@@ -69631,8 +69631,9 @@
*/
TEXT = 5
}
export interface _cocos_tiledmap_tiled_types__TMXObject {
+ properties: _cocos_tiledmap_tiled_types__PropertiesInfo;
id: number | string;
name: string;
width: number;
height: number;
|
cocos/tiledmap/tmx-xml-parser.ts
Outdated
@@ -89,7 +89,7 @@ function strToColor (value: string): Color { | |||
|
|||
function getPropertyList (node: Element, map?: PropertiesInfo): PropertiesInfo { | |||
const res: any[] = []; | |||
const properties = node.getElementsByTagName('properties'); | |||
const properties = node.querySelectorAll(':scope > properties'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WeChat mini-games do not support this interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jerry457 Please fix test error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And modify the branch to 3.8.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in new PR: #17641
@Jerry457 There is also a ci error |
Greptile Summary
This pull request addresses issue #17484 by fixing the error in reading custom properties of object layers from TSX files.
properties
field toTMXObject
interface incocos/tiledmap/tiled-types.ts
.getPropertyList
function incocos/tiledmap/tmx-xml-parser.ts
to usequerySelectorAll
for better property selection.parseObjectGroup
method incocos/tiledmap/tmx-xml-parser.ts
to correctly assign properties to object layers.