@umituz/react-native-photo-editor 2.0.26 → 2.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-photo-editor",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
4
4
  "description": "A powerful, generic photo editor for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -44,10 +44,12 @@ export function useEditorStore() {
44
44
  }, [history.present, pushLayers]);
45
45
 
46
46
  const addStickerLayer = useCallback((uri: string) => {
47
- const layer = layerService.createStickerLayer(uri, {
47
+ const layer = layerService.createStickerLayer(uri);
48
+ // Set zIndex manually based on current layer count
49
+ const layersWithZIndex = layerService.updateLayer([...history.present, layer], layer.id, {
48
50
  zIndex: history.present.length,
49
- });
50
- pushLayers([...history.present, layer]);
51
+ } as Partial<Transform>);
52
+ pushLayers(layersWithZIndex);
51
53
  setActiveLayerId(layer.id);
52
54
  return layer.id;
53
55
  }, [history.present, pushLayers]);